MoreVariablesAndPrinting
Code
/// Name: Sam Benoy
/// Period: 6
/// Program Name:More Variables and Printing
/// File Name: MoreVariablesAndPrinting.java
/// Date Finished: 9/11/2015
public class MoreVariablesAndPrinting
{
public static void main( String[] args )
{
String Name, Eyes, Teeth, Hair;
int Age, Height, Weight;
double Centimeter, Kilogram;
Name = "Sam Benoy ";
Age = 16; // not a lie
Height = 72; // inches
Weight = 198; // lbs
Kilogram = 89.8; // kg
Centimeter = 182.88; // cm
Eyes = "red";
Teeth = "Blue";
Hair = "White";
System.out.println( "Let's talk about " + Name + "." );
System.out.println( "He's " + Height + " inches (or " + Centimeter + "cm) tall." ) ;
System.out.println( "He's " + Weight + " pounds (or " + Kilogram + "kg)heavy" );
System.out.println( "Thats a number." );
System.out.println( "He's got " + Eyes + " eyes and " + Hair + " hair." );
System.out.println( "His teeth are usually " + Teeth + " Something." );
// This line is tricky; try to get it exactly right.
System.out.println( "If I add " + Age + ", " + Height + ", and " + Weight
+ " I get " + (Age + Height + Weight) + "." );
}
}
MoreVariablesAndPrinting