Assignment 19; AskingQuestions
Code
// Donovan Rich
// 6
// Asking Questions
// AskingQuestions.java
// 9/24/2015
import java.util.Scanner;
public class AskingQuestions
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int age, heightF, heightI;
double weight;
System.out.print( "How old are you, huh? " );
age = keyboard.nextInt();
System.out.print( "How many feetsies tall are you, you peasant? " );
heightF = keyboard.nextInt();
System.out.print( "How many inches tall are you, you filthy memer? " );
heightI = keyboard.nextInt();
System.out.print( "How much do you weigh, bub? " );
weight = keyboard.nextDouble();
System.out.println( "So you're " + age + " years old, " + heightF + " feet, " + heightI + " inches tall and " + weight + " pounds. That's absolutely fascinating." );
}
}
Picture of the output