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