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 keyboard = new Scanner(System.in);
- String name;
- int age;
- double money;
- System.out.println("Hello. What is your name? ");
- name = keyboard.next();
- System.out.println("Hi " + name + " how old are you? ");
- age = keyboard.nextInt();
- System.out.println("So you're " + age + ", eh? That's not old at all! ");
- System.out.println("How much do you make? " + name + "?");
- money = keyboard.nextDouble();
- System.out.println(money + "! I hope that's per hour and not per year!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement