+ 1
Use of loops
# fun == programming
3 Antworten
+ 2
It's saves ur time.
+ 4
Execute code repeatedly.
+ 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.😀