← Back
Code Challenge 1.6 - Height Converter
Objective
Your task is to write a program that converts a given height from inches to feet and inches.
Example: If the user inputs 70 inches, your program should display: 5 feet 10 inches.
Skills to Practice
- Prompting a user for input
- Saving user input to variables
- Converting input to the correct data type (if necessary)
- Performing arithmetic calculations
- Formatting custom output using variables
Challenge Tasks
- Create a console project named Challenge 1-6.
- Prompt the user to input their height in inches.
- Convert the height to feet and inches.
- Display the result in the format: “{X} feet {Y} inches.”
Sample Output
Enter yout height in inches: 70 [Enter]
Your height is 5 feet 10 inches.