Use of loops | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Use of loops

# fun == programming

7th Jan 2020, 4:17 PM
Nihal Sharma
Nihal Sharma - avatar
3 Answers
+ 2
It's saves ur time.
8th Jan 2020, 3:38 PM
Nandalala
Nandalala - avatar
+ 4
Execute code repeatedly.
7th Jan 2020, 4:19 PM
HonFu
HonFu - avatar
+ 2
imagine someone give you task to print number from 1-5, you would say fine its easy and would do this: print(1) print(2) print(3) print(4) print(5) now what if you have to print number from 1-1000? would you do the same way before and the answer is no, right? Now come the rescuer called LOOP: (for loop in this case) for(int i = 1; i <= 1000; i++) print(i) Note: You will care and use loops only if you value your time.😀
7th Jan 2020, 5:56 PM
Rohit