+ 1
Cant understand break command in c language properly
. #include <stdio.h> int main() { int num = 5; while (num > 0) { if (num == 3) break; printf("%d\n", num); num--; } return 0; }
1 Odpowiedź
+ 6
https://www.sololearn.com/learn/2388/?ref=app
When a break statement is encountered inside a loop, the loop is immediately terminated and the program control resumes at the next statement following the loop.
If you are using nested loops, the break statement will stop the execution of the innermost loop and start executing the next line of code after the block.