Assignemnt #19 and Asking Questions
Code
/// Name: Josh Pell
/// Period: 6
/// Program Name: Asking Questions
/// File Name: AskingQuestions.java
///Date Finished: 10/2/2015
import java.util.Scanner;
public class AskingQuestions
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int age, feet, inches, weight;
String height;
height = "6'1";
System.out.print( "How old are you? " );
age = keyboard.nextInt();
System.out.print( "How many feet tall are you? " );
feet = keyboard.nextInt();
System.out.print( "How many inches tall are you? " );
inches = keyboard.nextInt();
System.out.print( "How much do you weigh? " );
weight = keyboard.nextInt();
System.out.println( "So you're " + age + " old, " + height + " tall and " + weight + " pounds." );
}
}
Picture of the output