do...while loop
The do..while loop is similar to the while loop with one important difference. The body of do...while loop is executed at least once. Only then, the test expression is evaluated.
The syntax of the do...while loop is:

do
{
// statements inside the body of the loop
}
while (testExpression);
How do...while loop works?
The body of do...while loop is executed once. Only then, the test expression is evaluated.
If the test expression is true, the body of the loop is executed again and the test expression is evaluated.
This process goes on until the test expression becomes false.
If the test expression is false, the loop ends.
File3.1.png
Program to add numbers until the user enters zero
Output

Enter a number: 1.5
Enter a number: 2.4
Enter a number: -3.4
Enter a number: 4.2
Enter a number: 0
Sum = 4.70

  
Put the parts in order to form a sentence. When you think your answer is correct, click on "Check" to check your answer. If you get stuck, click on "Hint" to find out the next correct part.