(L-9)FOR,WHILE AND DO-WHILE LOOPS
Loops are the statements which are used for more convineint work.
There are 3 types of loops
1.for loop
2.while loop
3.do-while loop
SYNTAX FOR FOR LOOP
for (initialization ;condition;updation)
{
loop body (c++ code);
}
SYNTAX FOR WHILE LOOP
while(condition)
{
loop body(c++ code)
}
SYNTAX FOR DO-WHILE LOOP
do:
{
c++ statements;
}while(condition);
Loops are the statements which are used for more convineint work.
There are 3 types of loops
1.for loop
2.while loop
3.do-while loop
SYNTAX FOR FOR LOOP
for (initialization ;condition;updation)
{
loop body (c++ code);
}
SYNTAX FOR WHILE LOOP
while(condition)
{
loop body(c++ code)
}
SYNTAX FOR DO-WHILE LOOP
do:
{
c++ statements;
}while(condition);