Assignemnt #14
Code
///Name: Colin Hinton
///Period:5
///Project Name: MoreVariablesAndPrinting
///File Name: MoreVariablesAndPrinting.java
///date completed:9/11/2015
class MoreVariablesAndPrinting
{
public static void main(String[] args)
{
String myName, myEyes, myTeeth, myHair;
int myAge, myHeight, myWeight;
double Centa, Kilo, EuroHeight, EuroWeight;
myName= "Colin l. Hinton";
myAge= 17; // soon will be 1 off
myHeight= 64; // inches
myWeight= 135; // lbs
myEyes= "Green";
myTeeth= "White";
myHair= "Dirty Blond";
Centa= 2.54;
EuroHeight= Centa * myHeight;
Kilo= .453592;
EuroWeight= Kilo * myWeight;
System.out.println("let's talk about " + myName + ".");
System.out.println("He's " + myHeight + " inches (or " + EuroHeight + "cm) tall.");
System.out.println("He's " + myWeight + " pounds. (or " + EuroWeight + "kg) Light");
System.out.println("He has got " + myEyes + " eyes and " + myHair + " hair.");
System.out.println("His teeth are usually " + myTeeth + " depending on his soda intake.");
System.out.println("if i add " + myAge + "," + myHeight + "," + myWeight + "," + " i get " + (myAge + myHeight + myWeight) + ".");
}
}
Picture of the output