Assignemnt #14 - MoreVariables.java
Code
/// Name: Boris Kazantsev
/// Period: 6
/// Program Name: MoreVariables
/// File Name: MoreVariables.java
/// Date Finished: 9/30/2015
public class MoreVariables{
public static void main(String[] args){
String Name, Eyes, Teeth, Hair;
int Age, Height, Weight;
Name = "Boris Kazantsev";
Age = 16;
Height= 82;
Weight= 135;
Eyes= "Brown";
Teeth= "White";
Hair= "Brown";
System.out.println("Let's talk about " + Name + ".");
System.out.println("He's " + Height + " inches " + "("+ (Height / 0.4) + " cm)" + "tall."); // in = cm * 0.39370 = cm * 0.4
System.out.println("He's " + Weight + " pounds " + " (~ " + Math.round((Weight / 2.2)) + "kg) ."); // kg = lb/2.2046 = lb / 2.20
System.out.println("Actually, that's not too light.");
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