Variable #14 (Not exact Height)
Code
/// Name: Amir Salehi
/// Period: 7
/// Program name: CreatingVariables
/// File name: CreatingVariables.java
/// Date: Finished 9/22/2015
public class MoreVariablesAndPrinting
{
public static void main( String[] args )
{
String myName, myEyes, myHobby, myHair;
int myAge, myHeight, myWeight;
myName = "Amir S. Salehi";
myAge = 18; // not a lie
myHeight = 5; // inches
myWeight = 110; // lbs
myEyes = "Brown";
myHair = "Brown";
myHobby= "Video Editing";
System.out.println( "Let's talk about " + myName + "." );
System.out.println( "He's about" + myHeight + " inches tall." );
System.out.println( "He's " + myWeight + " pounds." );
System.out.println( "Actually, that's a bit light." );
System.out.println( "He's got " + myEyes + " eyes and " + myHair + " hair." );
System.out.println( "His Hobbies are usually " + myHobby + " depending on the day." );
// This line is tricky; try to get it exactly right.
System.out.println( "If I add " + myAge + ", " + myHeight + ", and " + myWeight
+ " I get " + (myAge + myHeight + myWeight) + "." );
}
}
Picture of the output