+ 1
What is looping? Can you explain with an example for "do..while" loop....
5 Answers
+ 2
int age = 21;
do {
workFor1Year();
age++;
} while(age < 65);
retire();
+ 2
is this correct
.
.
"A loop statement allows us to execute a statement or group of statements multiple times and following is the general from of a loop statement in most of the programming languages: ... You can use one or more loop inside any another while, for or do..while loop."
+ 1
looping is running or executing some statements again and again till a condition or test fails.
do while is a exit control loop because the the condition or test is provided at the end of loop so first it runs the loop for 1st iteration and then condition is checked.
do{
x=x+2;//statement to run in loop
}while(x<5);//condition till the loop continues to run
+ 1
Ok
thanks to both of you
0
yes u can use any number of loops inside any loop
it is called nested looping