Is that possible to write a program that reads in a integer n and outputs the program itself n times?
A:
#define YOUR_PROGRAM_LANGUAGE
:p
ps: haven't heard of something like that so far. Sounds like you need to instruct your compiler in a special way
SirLenz0rlot
2010-05-21 09:29:27
The problem is well known, it's called a quine.
Andreas Brinck
2010-05-21 09:31:55
A:
Yes, it's possible. A program that prints out its own source code is known as a Quine; it's easy to find examples for all kinds of programming languages.
Modifying those to repeat the output n times should not be too difficult.
Michael Borgwardt
2010-05-21 09:35:11