Assignemnt #22
Code
/// Name: Connor Siri
/// Period: 7
/// Program Name: Salary
/// File Name: Salary.java
/// Date Finished: 9/22/2015
import java.util.Scanner;
class Salary{
public static void main(String[] args) {
String name;
int age;
double income;
Scanner keyboard = new Scanner(System.in);
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 super old.");
System.out.println("How much do you make? ");
income = keyboard.nextDouble();
System.out.println(income + " Wow that is not that much. Maybe you should try harder!" );
}
}
Picture of the output