Q. Suppose you are collecting money for something. You need rs 200 in all. You ask your parents, uncles and aunts as well as grandparents. Different people may give either rs 10, rs 20 or even rs 50. You will collect till the total becomes 200. Write the algorithm.


Answer :-


Set sum = 0
While sum = 200
       Input money obtained
       Sum += money

Print thank you

Algorithm :-

1- Start
2- Approach to parent, uncle, aunts and grandparents
3- Request for money
4- Collect given amount
5- Add amount received to make sure it is 200
6- If not reach to 200
7- Again, request from others
8- If received 200 goal achieved
9- Stop

 

2 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. Algorithm
    1- Start
    2- Approach to parent, uncle, aunts and grandparents
    3- Request for money
    4- Collect given amount
    5- add amount received to make sure it is 200
    6- if not reach to 200
    7- again, request from others
    8- if received 200 goal achieved
    9- stop

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post