Computer Science, asked by jaiswalmayur4652, 1 year ago

Discuss the advantage of looping with the help of an example.

Answers

Answered by chetan2222
0
Loops help in NOT writing the same code again and again, if you want something to happen again and again.

Let’s say i want you to count to 100 and i told you that you can add 1 to the previous number and you have to start from 1. Then i ask you what is the next number, you’ll tell me the number +1, then again i asked you, what’s next number, now saying each time that add one number to previous number up to 100 is tiresome. So, a better and easy way you suggested was just repeat this process of adding one to the number until we reach 100.

thank you

#chetan2222
Similar questions