Form the pair of linear equations in the following problems and find their solutions (if they exist) by any algebraic method :

A part of monthly hostel charges is fixed and the remaining depends on the number of days one has taken food in the mess. When a student A takes food for 20 days she has to pay Rs 1000 as hostel charges whereas a student B, who takes food for 26 days, pays Rs 1180 as hostel charges. Find the fixed charges and the cost of food per day.

#### Solution

Let x be the fixed charge of the food and y be the charge for food per day.

According to the question,

x + 20y = 1000 ... (i)

x + 26y = 1180 ... (ii)

Subtracting equation (i) from equation (ii), we get

6y = 180

y = 180/6 = 30

Putting this value in equation (i), we get

x + 20 × 30 = 1000

x = 1000 - 600

x = 400

Hence, fixed charge = Rs 400 and charge per day = Rs 30