Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/prog/ Challenge 9001

Name: Anonymous 2011-05-01 19:51

The correct title of this article is /prog/ Challenge 9001. It appears incorrectly here because of technical restrictions.

The task:

Print numbers from 1 to 1000 without using any loop or conditional statements. Don't just write the printf() or cout statement 1000 times.

inb4 lipthfags and dead dogs using some obscure functionality of their obscure languages.

Name: Anonymous 2011-05-01 21:31

>>5,10,12 Make use of jumps/calls which are themselves equivalent to loops.
>>6,9 Generate code which prints it (unrolling the loop).

As OP disallowed loops (I assume in runtime code, it shouldn't matter what you use in generation code), only >>6,9 are valid answers.
If you insist on disallowing loops in generating code, the only way to solve it is to only include the output of the generated code, but that is disallowed in the requirements.
This means that the challenge is only solvable by macros (as in Lisp, >>6), source code generation (any language), templates (as in SEPPLES, >>9) if some form of loops (control-flow) are allowed in the code generator.
If control-flow is not allowed anywhere, the problem is not solvable as per requirements the OP asked.

OP also sucks for being a bastard from the imageboards responsible for spamming our board and trolling (noko (not saging and making threads proclaiming his ignorance), over 9000 meme, corruption of the word lisp, spamming, insulting non-terrible dogs and other infractions).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List