I'm doing a Java exercise, and I need to display a persons height in both inches and cm, as well as their weight in both pounds and kg.. Here's what I came up with, but I'm getting tons of errors.
Height = 74; // inches
Weight = 180; // pounds
System.out.println( "He's " + Height + " inches or + (Height * 2.54) cm tall "." );
I got the 2.54 by just googling what the conversion was for inches to cm. I basically did the same thing for the weight (see below)
System.out.println( "He's " + Weight + " pounds or + (Weight * 2.20) kg heavy "." );
My goal is to get it to display:
He's 74 inches (or 187.96 cm) tall.
He's 180 pounds (or 81.6466266 kg) heavy.
Any help would be great, and sorry for such a basic question!