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