Lord of Shadows
2[H]4U
- Joined
- Mar 9, 2004
- Messages
- 3,322
Saw this earlier today figured it was semi interesting so I'm passing it on here.
Make that code print out the character 'x' twenty times by only replacing one character in three different ways. (You cant insert a character and must replace an existing character)
Tip: You are only going to be changing the for loops test section. -- lol, my tips wrong for one of the more obvious ones. =P
Enjoy!
Code:
int i, n = 20;
for (i=0; i<n; i--)
{
cout << "x" << endl;
}
Make that code print out the character 'x' twenty times by only replacing one character in three different ways. (You cant insert a character and must replace an existing character)
Tip: You are only going to be changing the for loops test section. -- lol, my tips wrong for one of the more obvious ones. =P
Enjoy!