Assignment 22: Name, Age, and Salary
Code
/// Name: Ryan McAteer
/// Period: 5
/// Program Name: Name, Age, and Salary
/// File Name: Assignment22.java
/// Date Finished: 9/22/15
import java.util.Scanner;
class Assignment22
{
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 + "! cool name! How old are you?" );
age = keyboard.nextInt();
System.out.println( + age + "? Interesting, you look much younger!" );
System.out.println( "Anyways, how much money do you make " + name + "?" );
income = keyboard.nextDouble();
System.out.println( "You make " + income + "! Don't you just love capitalism?" );
System.out.println( "Well, I'm off to the compiler, see you later " + name + "!" );
}
}
Picture of the output