Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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 #include #include Gallons Used 16.00 18.00 19.54 17.39 using namespace std

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What are several disadvantages of credit?

Answered: 1 week ago