C break
The break statement ends the loop immediately when it is encountered.
Its syntax is:
break;
The break statement is almost always used with if...else statement inside the loop.
File4.1.png
Program to calculate the sum of numbers (10 numbers max)
If the user enters a negative number, the loop terminates

Output

Enter a n1: 2.4
Enter a n2: 4.5
Enter a n3: 3.4
Enter a n4: -3
Sum = 10.30

  
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.