Assignment 14
Code
public class MoreVariablesAndPrinting
{
public static void main( String[] args )
{
String name, eyes, teeth, hair;
int age, height, weight;
name = "Nick N. Quijivx";
age = 17; // swaglord
height =68 ; // inches
weight = 135; // lbs
eyes = "Brown";
teeth = "White";
hair = "Dark Brown";
System.out.println( "Let's talk about " + name + "." );
System.out.println( "He's " + height + " inches tall." + " (or 172.72 cm)" );
System.out.println( "He's " + weight + " pounds." + " (or 61.235 kg)" );
System.out.println( "I am pretty light weight." );
System.out.println( "He's got " + eyes + " eyes and " + hair + " hair." );
System.out.println( "His teeth are usually " + teeth + " depending on the coffee." );
// 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) + "." );
}
}
Picture of the output