Assignemnt #19 and Asking Questions
Code
///Name: Daniel Rhees
///Period: 5
///Project Name: Asking Questions
///File Name: AskingQuestions.java
///Date: 10/5/2015
import java.util.Scanner;
public class AskingQuestions
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int age;
String height, heightIn;
double weight;
System.out.println( "How old are you? " );
age = keyboard.nextInt();
System.out.println( "How many feet tall are you? " );
height = keyboard.next();
System.out.println( "And how many inches? " );
heightIn = keyboard.next();
System.out.println( "How much do you weigh? " );
weight = keyboard.nextDouble();
System.out.println( "so you're " + age + " Years old, " + height + "'" + heightIn + " and " + weight + " pounds." );
}
}
Picture of the output