Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner keyboard = new Scanner(System.in);
- int age;
- String height;
- double weight;
- System.out.println("how old are you? ");
- age = keyboard.nextInt();
- System.out.println("How tall are you? ");
- height = keyboard.next();
- System.out.println("How much do you weigh? ");
- weight = keyboard.nextDouble();
- System.out.println("So you're " + age + " years old, " + height + " feet tall and " + weight + " kg heavy.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment