digitalmars.D - Challenge on Russian Stack Overflow
- Jack Applegame (14/20) Nov 11 2016 I found funny (from my point of view) challenge in Russian Stack
I found funny (from my point of view) challenge in Russian Stack Overflow. Any language accepted. You need to make the loopfor (int x=0; x<3; ++x) {}endless. Rules: - you can't modify the loop's code itself; - you can't modify the loop's variable inside the body of loop; - you can't wrap the loop in an outer infinite loop or insert an infinite loop inside the body; For example, C++ solution:int main() { #define int bool for (int x=0; x<3; ++x); return 0; }This is my D solution - http://ru.stackoverflow.com/a/589748/218208 Solution with the highest rating wins.
Nov 11 2016