Write the algorithm to buy an ice cream.
Answers
Answer:
step1: start the process
step2: check if you have enough money to buy
step3: there is money go to parlour otherwise get money first
step4: check if there is an ice cream parlour
step5: if there is a icecream parlour, check if the parlour has ice cream otherwise search another.
step6: if there is ice cream buy by giving money to vendor otherwise choose any else parlour
step7: stop
Answer:
step1: start the process
step2: check if you have enough money to buy
step3: there is money go to the parlour otherwise get the money first
step4: check if there is an ice cream parlour
step5: if there is an ice cream parlour, check if the parlour has ice cream otherwise search for another.
step6: if there is ice cream buy by giving money to the vendor otherwise choose any else parlour
step7: stop