Design the program to ask the user for beginning and ending


Design the program to ask the user for beginning and ending odometer readings, and the number of gallons purchased to fill-up (use a "while" loop which allows an indefinite number of readings and fill-ups). Calculate the average miles per gallon.

Use a "for" loop to enter the price per gallon from three gas stations, then calculate the average price per gallon.

Once you calculate the average miles per gallon, compare it to the chart below. Display the car classification for fuel efficiency.

high end of range (mpg)

low end of range (mpg)

classification

15

0

Very inefficient

30

16

OK

No limit

31 and higher

Very efficient

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Design the program to ask the user for beginning and ending
Reference No:- TGS01663065

Now Priced at $20 (50% Discount)

Recommended (93%)

Rated (4.5/5)