Assignemnt #21

Code

///Colin Hinton
///5th period
///EMQ
///EMQ.java
///9-16-2015

import java.util.Scanner;

class EMQ
{
    public static void main(String[] args)
    {
        String name;
        int age;
        double weight, income;
        
        Scanner keyboard = new Scanner(System.in);
        
        System.out.print(" Hello. What's your name? ");
        name = keyboard.next();
        
        System.out.print(" Hi " + name + "! How old are you? ");
        age = keyboard.nextInt();
        
        System.out.println(" So you are " + age + " ??? That's really old how are you on a computer.");
        System.out.print(" Now tell me how much you weigh, " + name + "?");
        weight = keyboard.nextDouble();
        
        System.out.print( weight + "! Better not tell that to anyone. Finally what's your income " + name + "?");
        income = keyboard.nextDouble();
        
        System.out.println(" Hopefully it is " + income + " per hour and not per year!");
        System.out.println(" Well, thanks for answering my rude questions, " + name + "." );
    }
}

    

Picture of the output

Assignment 1