Skip to content

Latest commit

 

History

History
70 lines (70 loc) · 1.56 KB

operators.md

File metadata and controls

70 lines (70 loc) · 1.56 KB

Operators

Skill Value
Using Operators +5 Levels
Reading Input from the User +2 Levels

Objective

Write a computer program that takes as input someone's height in Feet and inches and returns their height in centimeters.

Materials

You will need the JDK, terminal access or an IDE as well as git and access to GitHub.

Methods

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.

Data

For this lab, you should know that 1 inch is equal to 2.54 centimeters and that 1 foot has 12 inches.

Example Input/Output Sequence


How many feet tall are you?
5
How many inches are you?
10
You are 177.8 centimeters!

Conclusion

Congratulations! You have earned some experience working with operators!