normal 0 false false false en-in x-none


The do..while Loop

The general format is as follows :

                do

{

                                statements;

                                :

                                :

                 }             while(condition);

 

e.g.

                do

                 {

                                cout << x;

                 }             while( x < = 10);

The do.. while loop is exactly like while loop, with single difference. Here testing is done after implementing the statements inside the loop and if the condition evaluates to true then we enter the loop again ,while in while only after the expression is checked we enter the loop.  We can say do loop is implemented at least once.

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: normal 0 false false false en-in x-none
Reference No:- TGS0309276

Expected delivery within 24 Hours