Answer to Question #82492 in C++ for Jack M MacDougall

Question #82492
Gas PumpA gas pump calculates the cost of gas at a local gas station. The station charges $2.59 per gallon for regular grade gas, $2.79 per gallon for special grade gas, and $2.99 per gallon for super grade gas. Create an application that simulates the functionality of the gas pump. The user picks a grade of gas, and then enters the number of gallons. The program then displays the purchase details and the charge of the purchase.Define a void function namedgasCost, which accepts a char as the gas grade selected and a double as the number of gallons purchased as arguments. The function then calculates and displays the purchase details and total cost. For example: You purchased 38.25 gallons Regular grade gas at $2.59 per gallon. Your payment is $ 99.07. Write a program that prompts the user for the gas grade, and number of gallons, passes the values to the gasCost() function and then displays the charge on the console.
1
Expert's answer
2018-10-28T14:52:58-0400
Dear Jack M MacDougall, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS