while statement in C++

The second type of loop, the while loop, is used when we are not certain that the loop will be executed. After checking whether the initial condition is true or false and finding it to be true, then only while loop will enter into the loop operations. The general form of the while loop for a single statement is: while(expression) statement; The general form of the while loop for a block of statements is: while(expression) { statement 1; statement 2; …. …. } The expression can be any valid C++ language expression including the value of a variable, an unary or a binary expression, or the value returned by a function. The statement can be single or compount statement. The statement will be executed repeatedly, as long as the expression is true (i.e., as long as expression has a non zero value). statement must include some features that eventually alters...