Question 2 - 10 Write a program that prints the following menu for the user What do you want to do? 1. Convert from Inch
Posted: Sat Feb 19, 2022 3:23 pm
Question 2 - 10 Write a program that prints the following menu for the user What do you want to do? 1. Convert from Inches to Centimetre. 2. Convert from Centimetre to Inches. The program should prompt the user to choose from the above 2 options (by entering the option numbers and ask him then to enter the value of the centimeters or inches according to the user selection. The program then wil perform the required conversion and output the results. The program should use switch statement to perform the required conversion. If the user input an invalid option number (any option that is not 1 of 2), the program will output the error message "Invalid choice, please run the program again and chose a correct option" 1 inch = 2.54 centimetres Sample input/output: bu want to do? from Inches to Centimeters. from Centimeters to Inches. choice (1 or 2): 1 th in Inches: 5.2 al to 13.208 cm Sample input/output: ou want to do? from Inches to Centimeters. from Centimeters to Inches. choice (1 or 2): 2 th in Centimeters: 10.5 equal to 4.13386" Sample input/output ou want to do? from Inches to Centimeters. from Centimeters to Inches. choice (1 or 2): 3 bice, please run the program again and chose a correct option! Tuner