1 2 3 4 5 6 7 8 9 10 11 12 13 14
//en.cppreference.com/w/c/language/goto.html #include <stdio.h> int main(void) { // goto can be used to leave a multi-level loop easily for (int x = 0; x < 3; x++) { for (int y = 0; y < 3; y++) { printf("(%d;%d)\n",x,y); if (x + y >= 3) goto endloop; } } endloop:; }