Help please


One litre of fuel is 0.264179 gallons. Write a program that will
read in the number of litres of petrol consumed by the user's car
and the number ofmiles traveled by the car.The program should then
output the number of miles per gallon ​the car delivered.
You must show the outputs as given in the example.You must show the
numbers in fixed point left justified and in three decimal places as
in the example.
Example
This program read the number of litres of petrol consumed
(Petrol In Litres) and the number of miles traveled by the
car (Miles)
Please enter the number of litres of petrol consumed: 15.5
Please enter the number of miles traveled by the car: 75
Petrol consumed (in litres) Miles travelled Miles per Gallon
15.500 75.000 18.316
Last edited on
Use meaningful, specific subject headers
The subject header is your golden opportunity to attract qualified experts' attention. Don't waste it on babble like 'Please help me' Don't try to impress us with the depth of your anguish; use the space for a super-concise problem description instead.


Don't post homework questions
Programmers are good at spotting homework questions; most of us have done them ourselves. Those questions are for you to work out, so that you will learn from the experience. It is OK to ask for hints, but not for entire solutions.


http://www.cplusplus.com/forum/beginner/1/#msg6680
Topic archived. No new replies allowed.