Question: C++ thank you! Write a program that asks the user to enter a distance in meters. The program will then present the following menu of
C++ thank you!
Write a program that asks the user to enter a distance in meters. The program will then present the following menu of selections:
1. Convert to kilometres
2. Convert to inches
3. Convert to feet
4. Quit the program Depending on the user's selection, the program will convert the distance to kilometres, inches, or feet.
Here are the formulas you need:
kilometers = meters * 0.001
inches = meters * 39.37
feet = meters * 3.281
The program should continue to display the menu until the user enters 4 to quit the program.
The program should not accept negative numbers for the distance in meters.
The program should display an error message if the user selects an invalid choice from the menu and allow them to choose again.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
