what is difference between while loop and do while loop
While:
- entry control loop
- condition is checked before loop execution
- never execute loop if condition is false
- there is no semicolon at the end of while statement
- exit control loop
- condition is checked at the end of loop
- executes false condition at least once since condition is checked later
- there is semicolon at the end of while statement.
Comments
Post a Comment