Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Input2
- {
- public static void main(String[]args)
- {
- Scanner scanner = new Scanner(System.in);
- System.out.println("How old are you?");
- int age = scanner.nextInt();
- if(age >= 70)
- {
- System.out.println("You're old.");
- }
- else
- {
- System.out.println("You still have time.");
- }
- System.out.println("How tall are you in inches?");
- int height = scanner.nextInt();
- if (height < 2)
- {
- System.out.println("Tyler is scared.");
- }
- else if (height <= 50)
- {
- System.out.println("You are short.");
- }
- else if (height <= 70)
- {
- System.out.println("You are average.");
- }
- else
- {
- System.out.println("You are tall.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement