Implement a solution for problem 3 from the Algorithms 12 assignment (Given below). Note the following directions. Make sure that you use appropriate data type for all variables, include the introductory comments (purpose of the program, input needed, output expected, and processing needed), and follow the posted Assignment Guidelines to the extent of material covered in class so far. Do not put any code in the introductory comments or any arithmetic expressions in cout statements.
Prompt the user to enter an I for the conversion from inches to centimeters, a Q for the conversion of quarts to liters, a P for pounds to kilograms, an M for miles to kilometers, or an O for ounces to grams. Use a “simple-if” (single-branched if) to check the user’s input and when it is wrong output a message, prompt the user to re-enter the choice, and store the new value. Use a multiway branch to ask the user to enter the value for conversion, and calculate the metric equivalent. Use “simple ifs” (single-branched if’s) to confirm the entered value to be converted is valid (you do not have to check it is a number). Remember that for now you should assume the user will not enter an incorrect value twice.
The message for the invalid input of value to be converted should be something like
“The number of quarts cannot be negative. Please re-enter the number of quarts to be converted to liters”
===================================================================================================================
Problem 3 Algorithms 12 Assignment: Write a process to allow user to convert from English units to metric units. The user should be prompted to choose what type of conversion he/she would like to convert: inches to centimeters, quarts to liters, pounds to kilograms, miles to kilometers, or ounces to grams. The user should be able to choose the conversion by entering a number or a letter. Then the user should be asked to enter the value to be converted. When the user enters a value less than zero for the original measurement, tell him/her that the input is invalid as ask user to enter the value again. Assume the user will not enter an incorrect value more than once.
=======================================================================================================================