VC++6 compiler was a lot faster (to fail on wrong code) - but still took 30 minutes on 1GHz machine. Result is that there are indeed only 3 solutions.Code:- at 24: int i, n = 20; for (i=0;-i<n; i--) { cout << "x" << endl; } + at 26: int i, n = 20; for (i=0; i+n; i--) { cout << "x" << endl; } n at 30: int i, n = 20; for (i=0; i<n; n--) { cout << "x" << endl; }