0
Loop means?
4 Réponses
0
A continuos circular path.If you write a logic within the loop block then logic will be continuously follow the circular path,if you want to stop this then either provide a logic or simple use the "break;" statement to break the continuous path.
Example: for loop:-->> for(int i=0;i<3;i++){}
Here int i=0 is the intialization part that means it is the starting point.Here i start with the value 0 then it will check it is less than 3 or not?? if yes then it will enter the loop that means you are allowing the loop to make a one cycle.After that the value of i will be 1
Why? Very simple i++ means i=i+1 then again it will check the condition part(it is less than 3 or not,if yes then it will enter if not then it will not enter the loop)
P.S. Hope you understand the concept.Cheers☺☺
0
Its a set of instructions that keep running while certain conditions are true.
0
repetitions