Assignment # 19 and Asking Questions
Code
/// Name: Tommy Oyuntseren
/// Period: 7
/// Program Name: AskingQuestions
/// File Name: AskingQuestions.java
/// Date Finished: 9/28/15
import java.util.Scanner;
public class AskingQuestions
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
System.out.print( "How old are you? " );
int Age = keyboard.nextInt();
System.out.print( "How many feet tall are you? " );
int Feet = keyboard.nextInt();
System.out.print( "How many inches tall are you? " );
int Inches = keyboard.nextInt();
System.out.print( "How much do you weigh? " );
double Weight = keyboard.nextDouble ();
System.out.println( "So you're " + Age + " old, " + Feet + "'" + Inches + "\"" + " tall and " + Weight + " pounds." );
}
}
Picture of the output