Run ❯
×
Change Orientation
Change Theme, Dark/Light
#include
int main() { int i, j; // Outer loop for (i = 1; i <= 2; ++i) { printf("Outer: %d\n", i); // Executes 2 times // Inner loop for (j = 1; j <= 3; ++j) { printf(" Inner: %d\n", j); // Executes 6 times (2 * 3) } } return 0; }
Outer: 1
Inner: 1
Inner: 2
Inner: 3
Outer: 2
Inner: 1
Inner: 2
Inner: 3