Assignemnt #19 and Asking Questions
Code
/// Name: Brian Phillips
/// Period: 5
/// Program name: Asking Questoins
/// File Name: AskingQuetions.java
/// Date Finished: 9/23/2015
import java.util.Scanner;
public class AskingQuestions
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
//This is the changed input
int age, height_Feet, height_Inches;
double weight;
System.out.print( "How old are you? " );
age = keyboard.nextInt();
System.out.print( "How many feet tall are you? " );
height_Feet = keyboard.nextInt();
System.out.print( "How many inches? " );
height_Inches = keyboard.nextInt();
System.out.print( "How much do you weigh? " );
weight = keyboard.nextDouble();
//Trying to get the output for height as feet and inches together with escape sequence
System.out.println( "So you're " + age + " old, " + height_Feet+ "'" +height_Inches + "\" tall and " + weight + " pounds." );
}
}
Picture of the output