Ask a Teacher



WHICH ARE THE TYPES OF LOOPS?

A loop is a repeating sequence of activities contained within a process. There are three types of loops available: for loops, while loops, and do-while loops. 

For loops repeat the same sequence of activities a specified number of times. 

While loops and do-while loop repeat the same sequence of activities as long as some condition is satisfied. Do-while loops are guaranteed to run at least once, whereas while loops will never run if the condition is false from the start. 


comments powered by Disqus