Assignemnt #22
Code
/// Name: Holden Ganch
/// Period: 7
/// Program Name: twenty secondth Program
/// File Name: NameAgeSalary.java
/// Date Finished: 9/24/2015
import java.util.Scanner;
public class NameAgeSalary
{
public static void main( String[] args )
{
String name;
int age;
double make, grade;
Scanner keyboard = new Scanner(System.in);
System.out.print( "Hello. What is your name? " );
name = keyboard.next();
System.out.print( "Hi, " + name + "! How old are you? " );
age = keyboard.nextInt();
System.out.println( "So you're " + age + ", ? Ha your an old fart." );
System.out.print( "How much do you make, " + name + "? " );
make = keyboard.nextDouble();
System.out.print( + make + "! I hope thats per hour and not per year! LOL! " );
}
}
Picture of the output