Question: statement can be used to terminate the current iteration and cause the next iteration to begin. Example using the break statement: int item.product = 1:
statement can be used to terminate the current iteration and cause the next iteration to begin. Example using the break statement: int item.product = 1: In the above example, as soon as the user enters the value 0 for item, the loop terminates. Example using the continue statement: int done = 0: int number, sum = 0: while (!done) { printf("Enter a number"): scanf("%d", &number): if(number 100) done = 1: } statement can be used to terminate the current iteration and cause the next iteration to begin. Example using the break statement: int item.product = 1: In the above example, as soon as the user enters the value 0 for item, the loop terminates. Example using the continue statement: int done = 0: int number, sum = 0: while (!done) { printf("Enter a number"): scanf("%d", &number): if(number 100) done = 1: }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
