Advertisement
CamiloCastilla

Untitled

Sep 11th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args) {
  6.  
  7.         Scanner keyboard = new Scanner(System.in);
  8.  
  9.         int age;
  10.         String name;
  11.         double salary;
  12.  
  13.         System.out.print( "Hello. What is your name?" );
  14.         name = keyboard.next();
  15.  
  16.         System.out.print( "Hi " + name + "! How old are you?"  );
  17.         age = keyboard.nextInt();
  18.  
  19.         System.out.print( "So you´re " + age + ", eh? That´s not old at all! How much do you make," + name +  "?");
  20.         salary = keyboard.nextDouble();
  21.  
  22.  
  23.  
  24.         System.out.println( salary + "!  I hope that's per hour and not per year! LOL!" );
  25.  
  26.  
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement