Advertisement
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 input = new Scanner(System.in);
- int age;
- int heightMeters;
- int heightCm;
- double weight;
- System.out.println();
- System.out.print("How old are you? ");
- age = input.nextInt();
- System.out.print("How many meters tall are you? ");
- heightMeters = input.nextInt();
- System.out.print("And how many centimeters? ");
- heightCm = input.nextInt();
- System.out.print("How much do you weigh in kilograms? ");
- weight = input.nextInt();
- System.out.println();
- System.out.println("So you are " + age + " years old, " + heightMeters + "." + heightCm + "m tall, and weigh " + weight + "kgs.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement