A Pre-Paid taxi charges from the passenger as per the tariff given below:
Distance Rate
Up to 5 km 100
For the next 10 km 10/km
For the next 10 km 8/km
More than 25 km 5/km
Write a program to input the distance covered and calculate the amount paid by the passenger. The program
displays the printed bill with the details given below:
Taxi No. :
Distance covered :
Amount :
Answers
Answered by
2
Answer:
it's very long question search in Google and it's answer is also long
hope it's helpful for you..
Answered by
4
Answer:
Let fixed charge be Rs x and charge per km be Rs y.
⇒x+10y=105...(1)
⇒x+15y=155..(2).
Now From eq 2
⇒15y=155−x
⇒y=
15
155−x
...(3)
Substituting y from eq3 in eq1
⇒x+
15
10(155−x)
=105
⇒15x+1550−10x=1575
⇒5x=1575−1550
⇒5x=25
⇒x=5
Substituting x in eq2
⇒5+15y=155
⇒15y=155−5
⇒15y=150
⇒y=10
Hence x=5 and y=10
Fixed charge is Rs.55 and the charge per kilometer is Rs.1010
For 2525 km person have to pay = 5+10×25=255Rs.
HOPE THIS IS HELPFUL TO YOU
Similar questions
Computer Science,
2 months ago
Hindi,
2 months ago
Geography,
5 months ago
English,
5 months ago
History,
10 months ago