Assignemnt #14: More Variables And Printing
Code
/// Name: Kelsey Lieberman
/// Period 5
/// Program Name: MoreVariablesAndPrinting
/// File Name: MoreVariablesAndPrinting.java
/// Date Finished: 9/21/2015
public class MoreVariablesAndPrinting
{
public static void main( String[] args )
{
String Name, Eyes, Teeth, Hair;
int Age, Height_inches, Weight_lbs;
double Weight_kg, Height_cm;
Name = "Kelsey M. Lieberman";
Age = 17;
Height_inches = 68;
Height_cm = (Height_inches * 2.54);
Weight_lbs = 152;
Weight_kg = (Weight_lbs * 0.453592);
Eyes = "Blue";
Teeth = "White";
Hair = "Blonde";
System.out.println( "Let's talk about " + Name + "." );
System.out.println( "He's " + Height_inches + " inches tall." );
System.out.println( "He's " + Weight_lbs + " pounds." );
System.out.println( "Actually, that's not too heavy." );
System.out.println( "He's got " + Eyes + " eyes and " + Hair + " hair." );
System.out.println( "His teeth are usually " + Teeth + " depending on the coffee." );
System.out.println( "If I add " + Age + ", " + Height_inches + ", and " + Weight_lbs + " I get " + (Age + Height_inches + Weight_lbs) + "." );
System.out.println( "My Height in cm is " + Height_cm + "cm.");
System.out.println( "My weight in kg is " + Weight_kg + "kg.");
}
}
Picture of the output