Assignment #22
Code
/// Name: Dr. Jonathan Stine
/// Period 5
/// Program Name: NAS
/// File Name: NAS.java
/// Date Finished: 9/30/2015
import java.util.Scanner;
public class NAS
{
public static void main( String[] args )
{
String name;
int age;
double salary;
Scanner keyboard = new Scanner(System.in);
System.out.println( "Hi there, what's you name? ");
name = keyboard.next();
System.out.println();
System.out.println( "Hello, " + name + " how old are you?");
age = keyboard.nextInt();
System.out.println();
System.out.println( "So you're " + age + ", eh? That's not old at all!\nHow much do you make, " + name + "?" );
salary = keyboard.nextDouble();
System.out.println();
System.out.println( salary + "! I hope that's per hour and not per year! LOL!" );
}
}
Code Output