Question: Help users calculate their cars miles per gallon. Write a program to allow a user to enter the number of miles driven and the number

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 (posttest) loop to allow users to enter as many sets of data as desired.

Step by Step Solution

3.46 Rating (159 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 declare variables 2 Declare Miles As Integer 3 Declare Gallons As Integer 4 Declare Miles PerGallo... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Prelude to Programming Questions!