While Loop
|
Do While Loop
|
Test condition first before execution.
|
Test condition after execution.
|
It does not execute if condition false first.
|
It execute once if condition false.
|
While loop dose not terminate by semicolon.
|
Do While loop is terminate by semicolon.
|
Syntax : Initialization While (Test condition) {statement;
increment/decrement;
}
|
Syntax: Initialization
Do{statement;
increment/decrement;
}
While (Test condition);
}
|
Comments
Post a Comment