- 1 The Fuel Economy Of A Car Is The Distance Which It Can Travel On One Litre Of Fuel The Base Fuel Economy I E Its F 1 (340.59 KiB) Viewed 14 times
1 The fuel economy of a car is the distance which it can travel on one litre of fuel. The base fuel economy (i.e., its f
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
1 The fuel economy of a car is the distance which it can travel on one litre of fuel. The base fuel economy (i.e., its f
1 The fuel economy of a car is the distance which it can travel on one litre of fuel. The base fuel economy (i.e., its fuel economy when there is only one person the driver in the car) of a certain car is M kilometres per litre. It was also observed that every extra passenger in the car decreases the fuel economy by 1 kilometre per litre. P people want to take this car for a journey. They know that the car currently has V litres of fuel in its tank. Design a program to find the maximum distance this car can travel under the given conditions, assuming that all P people always stay in the car and no refuelling can be done? Note: That among the P people is also a driver, i.e., there are exactly P people in the car. Sample input: The number of people, P-5, base fuel economy M-10 km/litre, and amount of fuel present in the car V=20 litre. Sample Output: Maximum distance travelled by car is 60 km. [10M]