Assignemnt #22 and Name Age Salary
Code
///Name: Joshua Bautista
///Period: 6
///Project Name: Name Age Salary
///File Name: NameAgeSalary.java
///Date: 10/19/2015
import java.util.Scanner;
public class NameAgeSalary
{
public static void main( String[] args )
{
String name;
int age;
double salary;
Scanner keyboard = new Scanner(System.in);
System.out.print( "Greetings, my name is O.R.A.N.G.E whats yours?" );
name = keyboard.next();
System.out.print( "Hello, " + name + "! How old are ya? " );
age = keyboard.nextInt();
System.out.println( " So you're " + age + " ,hmmmmm I am 2 years old! " );
System.out.println( " So how much do you make? " );
salary = keyboard.nextDouble();
System.out.println(+ salary + " Tsk tsk not good enough ");
}
}
Picture of the output