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