Computer Science, asked by RishiKherde1622, 1 day ago

3. A cab company has fixed the price according to the following criteria. Write a C program to
calculate the final bill based on the information given below:
First 10 Km Rs. 11/km
Next 90Km Rs. 10/km
After that Rs. 9/km

Answers

Answered by Kritika25675
2

Answer:

Correct option is

A

Fixed charge is Rs.5 and the charge per kilometer is Rs.10 For 25 km person have to pay Rs.255.

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.

Similar questions