November 11, 2016 Challenge on Russian Stack Overflow | ||||
---|---|---|---|---|
| ||||
I found funny (from my point of view) challenge in Russian Stack Overflow. Any language accepted. You need to make the loop > for (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. |
Copyright © 1999-2021 by the D Language Foundation