Question: a program using If statements and while loops (or do while loops). its for C++ and is done to work in visual studio. you can

a program using If statements and while loops (or do while loops). its for C++ and is done to work in visual studio.
you can only use #include
#include and
#include
please comment what youare doing as id like to be able to use it as a step by stro to udnerstand how and why its done like that. thanks :)  a program using If statements and while loops (or do while
loops). its for C++ and is done to work in visual studio.

2. Explain the purpose of the program to the user. Do this in a separate function. Request the type of conversion: MPG to L/100km (accept only L or I) or L/100km to MPG (accept M or m only). Continue to ask the user until the correct selection is made. Do this in main. 4. Request the rate (accept 10-60 MPG inclusive only) and (accept 3-30 1/100km inclusive only). Continue to ask the user until the rate is within the specified range. Do this in a separate function. 5. Do the conversion. Use imperial gallons (4.546 liters per gallon) in your calculations. Do this in a separate function, the function must be called from main. 6. Display the result. The output should include the input rate including units and the converted rate including units. The output must be displayed with an accuracy of two decimal places. Do this in a separate function. Ask the user if he/she would like to complete another conversion. If so (accept Y or y only), do not explain the purpose of the program again. The program should continue until the user would like to quit. Do this in main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!