Do-while loop



what is the Do-while loop?  

it is also called an exit controller loop because, in the case of the do-while loop it case the initial condition is true or not at lase and as long as the test condition is true, the statement will be repeated again and again, otherwise the loop will terminate.  

syntax  

do{ 

    statement(s); 

}while(condition); 

 

Structure   

OUTPUT
enter a value: 
10
the even numbers are: 
2 4 6 8 10 12 

Follow our page for regular updates.

0 Comments