Assignemnt #22
Code
/// Name: Ryan Volko
/// Period: 7
/// Program Name: Name Age Salary Program
/// File Name: NameAgeSalary.java
/// Date Finished: 9/29/2015
import java.util.Scanner;
public class NameAgeSalary
{
public static void main( String[] args )
{
String name;
int age;
double weight, income;
System.out.println( "Hi I'm going around the city trying to fill out a survey. Let me begin");
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 + ", eh? You look twelve." );
System.out.print( "How much do you weigh, " + name + "? " );
weight = keyboard.nextDouble();
System.out.print( weight + "! Better keep that quiet. Finally, what's your income, " + name + "? " );
income = keyboard.nextDouble();
System.out.println( "Wow " + income + " per hour get a job you bum!" );
System.out.println( "You are the reason your family is lower middle class because you dont contribute!!!");
System.out.println( "Thanks for helping me with this survey " + name + " Sorry for my outburst" );
}
}
Picture of the output