Skill | Value |
Using Operators | +5 Levels |
Reading Input from the User | +2 Levels |
Write a computer program that takes as input someone's height in Feet and inches and returns their height in centimeters.
You will need the JDK, terminal access or an IDE as well as git and access to GitHub.
Your program should ask for a person's height in feet and inches at a prompt, preferably as two separate prompts accepting an integer number of feet and an integer number of inches. Your program should then calculate the number of centimeters from this information and display the result to the user.
For this lab, you should know that 1 inch is equal to 2.54 centimeters and that 1 foot has 12 inches.
How many feet tall are you?
5
How many inches are you?
10
You are 177.8 centimeters!
Congratulations! You have earned some experience working with operators!