hi, a little puzzle for you, I hope not all know it already:
find three different solutions to get this code to print out 20 times x by only replacing a single character with another single character.Code:int i, n = 20; for (i=0; i<n; i--) { cout << "x" << endl; }
No adding of characters.
Usually people find two possibilities quite quickly but the third can be tricky
Bookmarks