/** A small program */ #include int main(void) { int c2 = 2; int c1 = 2; int c0 = 2; int base; for(base = 3; 1 ; base++) { printf("base=%d, (%d, %d, %d)\n", base,c2,c1,c0); if (0 < c0) c0--; else if (0 < c1) { c1--; c0 = base; } else if (0 < c2) { c2--; c0 = c1 = base; } else break; } return base; }