C++

Kenny C.

asked • 10/23/18

what is the code?

A bus line has busses with 30 gallon tanks. that it uses to travel to different cities. The company needs you to write a c++ program that will allow the clerk to input the roundtrip mileage to and from a city. If miles of trip are zero or less, output, “No trip. Program has ended…”. Otherwise, prompt the user to enter the miles per gallon the bus gets. If miles per gallon is greater than 25, and mileage of roundtrip is less than 100, output “It is not economical to use this vehicle.” Otherwise, calculate and print out the number of fill-ups it will take to complete the roundtrip. (Note: Should be in decimal format.)

1 Expert Answer

By:

Andy C. answered • 10/24/18

Tutor
4.9 (27)

Math/Physics Tutor

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.