James Dow Allen wrote:
[...]
> The following program, believe it or not, prints every prime
> (in "Stone-age" or unary code) in order! (subject, like any
> program, to precision and overflow issues on your machine).
> This version is not user-friendly: it may core-dump when
> the primes get too big for it to handle.
[...snip...]
Apparently, only 2, 3, and 5 ("11", "111", and "11111") are prime, as
the program exits at that point. (Either that, or 7/"1111111" is "too
big for it to handle".)
--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody |
www.hvcomputer.com | |
| kenbrody/at\spamcop.net |
www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <private.php?do=newpm&u=>