216k views
23 votes
Ramesh goes to market for buying some fruits and vegetables .He

purchases Apple, Mango and Tomato from a shop. Write an algorithm to

help Ramesh find the total amount to be paid to the shopkeeper if he

buys 2 kgs of apples, 2 kgs of mangoes and 1 kg tomatoes.​

User Xceph
by
5.8k points

1 Answer

7 votes

Answer:

The algorithm is as follows

1. Start

2. Input Apple unit price

3. Input Mango unit price

4. input Tomato unit price

5. Total = Apple Price * 2 + Mango Price * 2 + Tomato Price

6. Display Total

7. End

Step-by-step explanation:

Start the algorithm

1. Start

The next three lines gets input for the price of each fruit

2. Input Apple unit price

3. Input Mango unit price

4. input Tomato unit price

This calculates the total price

5. Total = Apple Price * 2 + Mango Price * 2 + Tomato Price

This displays the total price

6. Display Total

Stop the algorithm

7. End

User Thomas Spycher
by
5.7k points