17.7k views
2 votes
Help users calculate their car's miles per gallon. Write a program to allow a user to enter the number of miles driven and the number of gallons of gas used. The output should be the miles per gallon. Use a Do...While (post- test) loop to allow users to enter as many sets of data as desired. Using Raptor program

User Mishigen
by
4.8k points

1 Answer

2 votes

Answer:

The Raptor program for this question is given in the attachment below.

Step-by-step explanation:

  • Run a loop until user decides to quit the program.
  • Get the number of miles and gallons from user as an input.
  • Use the formula to calculate miles per gallon.
  • Display the calculated value of miles per gallon.
  • Ask the user if they would like to continue using this program.
Help users calculate their car's miles per gallon. Write a program to allow a user-example-1
User Loilo
by
5.1k points