+ 3
Who can explain loops.?
in simple
7 Respuestas
+ 11
In computer programming, a loop is a sequence of instruction s that is continually repeated until a certain condition is reached. ✌️👻
+ 8
Loops are type of statements that keep executing until the specified condition is met.
+ 6
Simplest way to put it, loops are kind of like if statements, except the loop will keep executing the code until the condition evaluates to false.
+ 5
ok. Loop is just a structure that have a expression for avaliation
While(expression/condition)
for(expression/condition)
do While (expression/condition)
If the expression or condition inside () is true the code go inside loop executes and go back to start of the loop and get prepare to condition be checked again. In other words you just go outside loop if you expression/condition is false.
Just have one exception. do-while loops always executes once.
because they executes first and after the expression checks occurs.
For more reference you can see this post:
https://www.sololearn.com/Discuss/1554388/when-we-can-use-do-while-loop-in-c-programming-language
If you have any doubt feel free to ask.
+ 2
loop means doing samething for many times
you can custmize it by using conditions
+ 1
{{username}} perfect explanation. i couldn't do so simple and better
+ 1
Anya ty :)