Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Input
- {
- public static void main(String[]args)
- {
- Scanner scanner = new Scanner(System.in);
- System.out.println("How old are you?");
- int age = scanner.nextInt();
- System.out.println("You are " + age + " years old.");
- System.out.println("How tall are you in inches?");
- int height = scanner.nextInt();
- System.out.println("You are " + height/12 + " feet and " + height%12 + " inches tall.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement