Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have this c++ program that i have to create but i am stuck on it. Write a height conversion program that shall allow user
I have this c++ program that i have to create but i am stuck on it.
Write a height conversion program that shall allow user to convert from feet and inches to meters (option 1) and vice versa (option 2). User shall be able to specify the type of conversion (a menu of two options). Display an error message if an invalid option is specified. Otherwise, the program would read in a length in feet and inches (two separate integer values like 5 and 6) and will output the equivalent length in meters (a double value) or read in a length in meters (a double value) and will output the equivalent length in feet and inches (two separate integer values and inches shall be between 0 and 11). There are 0.3048 meters in a foot, and 12 inches in a foot. For example, if 5 feet and 6 inches are entered for option 1 then the program should output 1.68 meters. On the other hand, if a value of 1.68 meters is entered for option 2 then the program should output 5 feet and 6 inches. You might need to perform casting (type conversion) and possibly rounding for this program to work properlyStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started