Assignemnt #19 and Asking Questions
Code
/// Name: Mark Katz
/// Period: 6
/// Program Name: Asking Questions
/// File Name: AskingQuestions.java
/// Date Finished: 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 heightinch, heightft;
double weight;
System.out.print( "How old are you? " );
age = keyboard.nextInt();
System.out.print( "How many feet tall are you? " );
heightft = keyboard.next();
System.out.println( "How many inches are you? ");
heightinch = keyboard.next();
System.out.print( "How much do you weigh? " );
weight = keyboard.nextDouble();
System.out.println( "So you're " + age + " years old, " + heightft + " feet, " + heightinch + " inches tall and " + weight + " pounds." );
}
}
Picture of the output