Computer Science, asked by cheyanne6121, 2 months ago

Explain the working of while loop structure with an example

Answers

Answered by nehasaraf902
0

Answer:

okok

Explanation:

Answered by bugadwalazainab52
0

selected Jan 31, 2020 by Ritik01 A while loop statement repeatedly executes a statement or sequence of statements written within the flower brackets as long as a given condition returns the value ‘true’.

Syntax: The syntax of a while loop in C++ is: while(condition) { statement(s); } Here the condition may be any expression, and true for any non zero value. The loop iterates while the condition is true. When the condition becomes false, program control passes to the line immediately following the loop. During the first attempt, when the condition is tested and the result is false, the loop body will be skipped and the first statement after the while loop will be executed.

Similar questions