The do/while loop is a variant of the loop with one but there is one of the major differences is the body of do/while loop is executed once before the condition is checked. Then it will repeat the loop as long as the condition is true.
The Syntax of do/while loop is as follows:
// loop Statements;
} while (condition);
Flowchart of do/while Loop:
Example – Write a Program to Print 1 to 10 integers: