I will need clues to run this program

Write a program that prompts the user for their name and then will compute a car's miles per gallon given input of miles driven and gallons of gas used. It should also convert those given numbers into metric and show kilometers driven, liters used, and kilometers per liter. All with well formatted output.

Submit:

A copy of your pseudocode (Also due as a separate assignment)
A working and well commented program. (Just submit the .cpp file
prompts the user for their name


Have you learned about strings?

given input of miles driven and gallons of gas used.


How many variables do you think are required to obtain the miles and the gallons of gas used? What would be the data type of the variables (i.e. int, float, etc...)?

convert those given numbers into metric and show kilometers driven, liters used, and kilometers per liter.


If I say my name is Chicofeo and I drove 50 miles and I used 7 gallons, what is my mileage per gallon?

Do you know how to convert from miles to kilometers?

how many kilometers did I drive?

Do you know how to convert from gallons to liters?

How many liters did I use?

What is my kilometers per liter usage?
@chicofeo

If it takes you 7 gallons to drive 50 miles, you need a new car.
@doug4,

Never! :)
Topic archived. No new replies allowed.