Assignemnt #14 and More Variables And Printing
Code
/// Name: Raff Lisbona
/// Period: 6
/// Program Name: More Variables And Printing
/// 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, Weight;
Name = "Raff Lisbona";
Age = 16;
Height = 70; //inches
Weight = 160; //lbs
Eyes = "Brown";
Teeth = "White";
Hair = "Brown";
System.out.println( "Let's talk about " + Name + "." );
System.out.println( "He's " + Height + " inches (or " + (Height * 2.54) + " cm) tall." );
System.out.println( "He's " + Weight + " pounds (or " + (Weight * 0.453592) + " kg) heavy." );
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 + ", and " + Weight +
" I get " + (Age + Height + Weight) + "." );
}
}
Picture of the output