120k views
2 votes
Ramshewak goes to market for buying some fruits and vegetables. He ishaving a currency of Rs 500 with him for marketing. From a shop he purchases 2.0 kg Apple priced Rs. 50.0 per kg, 1.5 kg Mango priced Rs.35.0 per kg, 2.5 kg Potato priced Rs.10.0 per kg, and 1.0 kg Tomato priced Rs.15 per kg. He gives the currency of Rs. 500 to the shopkeeper. Find out the amount shopkeeper will return to Ramshewak. and also tell the total item purchased. write the algorithm to the problem​

1 Answer

1 vote

Answer:

Step-by-step explanation:

To find the amount that the shopkeeper will return to Ramshewak and the total items purchased, we can use the following algorithm:

Set the initial amount paid by Ramshewak to the shopkeeper as 500.

Calculate the cost of 2.0 kg of apples at Rs. 50 per kg: 2.0 x 50 = 100

Add the cost of apples to the initial amount: 500 + 100 = 600

Calculate the cost of 1.5 kg of mangoes at Rs. 35 per kg: 1.5 x 35 = 52.5

Add the cost of mangoes to the total amount: 600 + 52.5 = 652.5

Calculate the cost of 2.5 kg of potatoes at Rs. 10 per kg: 2.5 x 10 = 25

Add the cost of potatoes to the total amount: 652.5 + 25 = 677.5

Calculate the cost of 1.0 kg of tomatoes at Rs. 15 per kg: 1.0 x 15 = 15

Add the cost of tomatoes to the total amount: 677.5 + 15 = 692.5

Subtract the total amount from the initial amount paid by Ramshewak to find the amount that the shopkeeper will return: 500 - 692.5 = -192.5

Since the total amount of the items purchased is Rs. 692.5 and Ramshewak paid Rs. 500, the shopkeeper will return Rs. 192.5 to Ramshewak.

Algorithm:

Set initial amount paid by Ramshewak to 500

Calculate cost of 2.0 kg of apples at Rs. 50 per kg

Add cost of apples to the initial amount

Calculate cost of 1.5 kg of mangoes at Rs. 35 per kg

Add cost of mangoes to the total amount

Calculate cost of 2.5 kg of potatoes at Rs. 10 per kg

Add cost of potatoes to the total amount

Calculate cost of 1.0 kg of tomatoes at Rs. 15 per kg

Add cost of tomatoes to the total amount

Subtract total amount from initial amount paid by Ramshewak to find amount shopkeeper will return to Ramshewak.

User Japollock
by
8.3k points