while loop
 
Notifications
Clear all

while loop

3 Posts
4 Users
0 Likes
538 Views
0
Topic starter

i have a doubt in while loop

3 Answers
0

While loop is a type of loop that exists in most programming languages, it is used to repeat a set of statement as long as a condition is true

while(condition) {
    statement 1;
    statement 2;
}

here the statements inside the block will execute as long as the given `condition` is true, when it becomes false the loop will stop executing.

0

A while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating if statement.

0

while loops are used to continue the loop as long as a particular condition is true

 

Share: