LakeLazyDays

LakeLazyDays - System.out.print("Please enter...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// **************************************************************** // LakeLazyDays.java // // Reads in a temperature from a vacationer and suggests an // appropriate activity. // // **************************************************************** import java.util.Scanner; public class LakeLazyDays { public static void main(String[] args) { int temp; Scanner scan = new Scanner (System.in); System.out.println("** Welcome to Lake LazyDays Resort! **");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.print("Please enter the temperature: "); temp = scan.nextInt(); if (temp > 95 || temp < 20) System.out.println("Visit our shops!"); else if (temp >= 80) System.out.println("Go swimming!"); else if (temp >= 60) System.out.println("Play tennis!"); else if (temp >= 40) System.out.println("Play golf!"); else System.out.println("Go skiing!"); } }...
View Full Document

Ask a homework question - tutors are online