Professional Documents
Culture Documents
Compare Among The Three Loops
Compare Among The Three Loops
WHILE
Sno For loop While
To execute the certain block of code repeatedly until some conditions are
Definition
satisfied
When you have an idea about the range
When you know the number of
Used for of values on which to iterate but are
iterations beforehand
unsure of the exact number
Will loop until the number ofWill loop until the condition presented
Loop
mentioned iterations are completed is completed