Assignment #14 MoreVariablesAndPrinting
Code
///Name: Ian Grant
///Period:5
///Project Name: More Variables And Printing
///File Name:MoreVariablesAndPrinting.java
///10/7/15
public class MoreVariablesAndPrinting
{
public static void main(String[] args)
{
String Name, Eyes, Teeth, Hair;
int Age, Height, Weight;
double incm,lbskg;
Name = "Ian Grant";
Age = 17;
Height = 70;
Weight = 142;
Eyes = "Hazel";
Teeth = "White";
Hair= "Brown";
incm= Height/0.39370;
lbskg= Weight/2.2046;
Math.round(incm);
Math.round(lbskg);
System.out.println("Let's talk about " + Name + "." );
System.out.println("He's "+Height+" inches tall.");
System.out.println("He's "+Weight+" pounds.");
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 coffe.");
System.out.println("If i add "+Age+", "+Height+", and "+Weight+" I get"+(Age+Height+Weight)+".");
System.out.println("My height in cm is "+incm+" and my weight in kg is "+lbskg+".");
}
}
Output