-moz-user-select:none; -webkit-user-select:none; -khtml-user-select:none; -ms-user-select:none; user-select:none;

Thursday 26 March 2015

Example of do-while loop

In this blog,I will concentrate on the do-while loop.
The difference between "While" and "do-while" loops are as below:

1. In while loop,the condition comes before the body of the loop while in do-while loop,it comes below the body of the loop.
2. In while loop,semi-colon comes after the condition while in do-while loop,semi-colon does not comes after the condition.
3.In while loop,the loop body is not executed at least once while in do-while loop,the loop body is executed at least once.

Now below is a simple example of do-while loop.


Source code


khgamujtaba,C++


Output

khgamujtaba,C++



No comments:

Post a Comment