Programming

while LOOP In C++…

while LOOP In C++

 

While Loop:

In while loop we put a condition to stop the certain loop.

The loops execute the piece of code written in it until the given condition becomes FALSE.

 

Syntax:

 

In this while loop we put the condition within round brackets at the start of the loop

with while so the loop firsts check the condition if the condition is true it executes the

code written in it until the condition becomes false.

 

 

 

 

 

Example 1:

 

 

 

 

 

 

Output:

Example 2:

Output:

1 Comment

1 Comment

  1. Pingback: LOOP’S IN C++ … – My Blog

Leave a Reply

Your email address will not be published.

Most Popular

To Top