Do...While
The do...while statement creates a loop that executes a specified statement until the test condition evaluates to be false. The condition is evaluated after executing the statement. The syntax for do... while is
Lets for example see how to print numbers less than 10 using do...while
loop:
Note:
i = i + 1
can be writteni++
.
Last updated
Was this helpful?