Question: Write C++ program that perform distance conversion. A distance may be entered in centimeters, inches or feet. the program convert the distance input into alternative
Write C++ program that perform distance conversion. A distance may be entered in centimeters, inches or feet. the program convert the distance input into alternative units. perform conversions with constant variable CETIMERTERS_IN_INCH, INCH_IN_FOOT. do calculations using both int and double. show output in both types. note that double provides more accurate result than INT. use casting to convert into double as needed. here is some example output for what is expected
This Program performs some distance conversions.
Enter option letter for distance unit : c) centimeters i) nch f) eet q) uit
Distance in centimeter (whole number) ?
integer: centimeters= inches= feet=
precise: centimeters= inches= feet=
Entering q will display the following message
Good-bye!
Entering another letter will display option (the letter) is invalid. Please try again
Extra credit:
a) ignore the options's case(upper or lower). sue toupper() to tolower()
b)use #include iomanip; setw()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
