Assignment #14 and More Variables and Printing
Code
/// Name: Brendan Baird
/// Period: 6
/// Program Name: More Variables and Printing
/// File Name: MoreVariablesAndPrinting.java
/// Date Finished: 9/15/2015
public class MoreVariablesAndPrinting {
public static void main( String[] args ) {
String Name, Eyes, Teeth, Hair;
int Age, Height, Weight;
double Kilo, Centi;
Name = "Brendan C. Baird";
Age = 17;
Height = 72; // inches
Weight = 140;
Eyes = "Blue";
Teeth = "White";
Hair = "Brown";
Kilo = 0.453592;
Centi = 2.54;
System.out.println( "Let's talk about " + Name + "." );
System.out.println( "He's " + Height + " inches (or " + (Height * Centi) + " cm) tall." );
System.out.println( "He's " + Weight + " pounds (or " + (Weight * Kilo) + " kg) heavy." );
System.out.println( "Pretty good bod." );
System.out.println( "He's got " + Eyes + " eyes and " + Hair + " hair." );
System.out.println( "His teeth are always " + Teeth + "." );
System.out.println( "If I add " + Age + ", " + Height + ", and " + Weight + " I get " + (Age + Height + Weight) + "." );
}
}
Picture of the output