PROGRAMMING AND CODE


Assignemnt #22

Code

/// Name: Justin Li
/// Period 7
/// Program Name: Name Age Salary
/// File Name: NameAgeSalary.java
/// Date Finished: 9/28/15

import java.util.Scanner;

class NameAgeSalary{
  
    public static void main(String[]args) {
      
        
        Scanner keyboard = new Scanner(System.in);
        
        String name;
        int age;
        double salary;
        
        System.out.println("Hello, what is you name");
        name = keyboard.next();
        
        System.out.println("Hello " + name + ", how old are you?");
        age = keyboard.nextInt();
        
        System.out.println("You are " + age + "? Ok, how much do you make?");
        salary = keyboard.nextDouble();
        
        System.out.println("So you make " + salary+ "? Cool! Go buy a sodie-pop");

          
          
    }
}
    

Picture of the output

Assignment 1