I'd like to introduce a new type of puzzle for programmers of C-Like languages (C++, Java and C#), the For Loop puzzle. You're asked to generate some sequence of numbers, you can only use a single for loop and no calculation can take place outside the for loop itself. It sounds easy but it's far from it. Watch the vid, you'll get the point.
These puzzles will hone your skills, test your knowledge of the language and operators and give your algorithm design skills a run around the block.
Please post novel solutions in the comments, I'd love to hear how other folks solve these twibbles.
Post interesting sequences also, that'd be cool too!
Негізгі бет For Loop Puzzles
Пікірлер: 27