Answered step by step
Verified Expert Solution
Question
1 Approved Answer
you needs to submit a running source code (.cpp file) (Practice a. Write, compile, and execute a C++ program that displays the following prompts: Enter
you needs to submit a running source code (.cpp file)
(Practice a. Write, compile, and execute a C++ program that displays the following prompts: Enter the miles driven: Enter the gallons of gas used: After 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 I gallons used. Verify your program by using the following test data: lest data set l: miles = 276, gas-10 gallons Test data set 2: miles-200, gas = 15.5 gallons fter finishing your verification, use your program to complete the following chart. (Make sure to convert the miles driven to kilometers driven and gallons used to liters used, and then compute the kilometers per liter.) Miles Driven Gallons Used MPG Liters Used Km/L Driven 250 275 312 296 16.00 18.00 19.54 17.39Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started