Question: 9) Write, compile, and run a C++ program that displays the following prompts: Enter the miles driven: Enter the gallons of gas used: fter each
9) Write, compile, and run a C++ program that displays the following prompts: Enter the miles driven: Enter the gallons of gas used: fter each prompt is displayed, your program should use a cin statement to accept data from the keyboard for the displayed prompt. After the number for gallons of gas used has been entered, your program should calculate and display the miles per gallon (mpg). This value should be included in a message and calculated by using the formula miles per gallon = miles / gallons used. Use your program to complete the following chart Mpg Miles driven 250 275 312 296 Use the following for the header of yourp #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
