difference between while and while loop in c++
Answers
Answered by
1
The Iteration statements in C++ and Java are, for loop, while loop and do while loop. ... Here, the maindifference between a while loop anddo while loop is that while loop check condition before iteration of the loop, whereas do-while loop, checks the condition after the execution of the statements inside the loop.
Answered by
0
...while Loop....
1. SYNTAX:
while(condition){
// statement
// iteration:
}
2. enter control.
3. minimum time run is zero(0).
4.you don't see the semicolon in the end of while loop.
...do-while Loop.....
1. SYNTAX.....
do{
// statement
// iteration
}while(condition);
2. exit-control loop.
3. minimum time run is one(1).
4.the semicolon placed at the end of loop.
Note: we can placed itreation also at the place of condition....
Similar questions