The do-while loop is another repetitive loop used in C++ programs. When a loop is constructed using the while statement, the test for continuation of the loop is carried out at the beginning of each pass. Sometimes, however, it is desirable to have a loop with the test for continuation at the end of each pass. This can be accomplished by means of do-while statement. The general form of the do-while statement is
The statement will be executed repeatedly, as long as the value of expression is true (i.e., is non-zero). Notice that statement will always be executed at...