Computer Science, asked by amalnaha, 11 months ago

why is while loop statement is used in C++​

Answers

Answered by neelamgeethikasarayu
1

Answer:

while loop can execute set of statements as long as condition is true.

Explanation:

eg:i=1

    while i<6

     cout<<i;

     i+=1

output:1

2

3

4

5

Answered by Anonymous
1

Answer:

The while loop in C/C++ is used in situations where we do not know the exact number of iterations of loop beforehand. The loop execution is terminated on the basis of the test condition. The various parts of the While loop are: Test Expression: In this expression we have to test the condition.

Similar questions