Primality by Wilson's theorem: Difference between revisions

Content added Content deleted
m (→‎{{header|Plain English}}: incorporate more of the comment into the program)
Line 582: Line 582:
Wait for the escape key.
Wait for the escape key.
Shut down.
Shut down.

The maximum representable factorial is a number equal to 12. \32-bit signed


To show some primes (via Wilson's theorem):
To show some primes (via Wilson's theorem):
If a counter is past 12, exit. \largest factorial respresentable by signed 32-bit integers
If a counter is past the maximum representable factorial, exit.
If the counter is prime (via Wilson's theorem), write "" then the counter then " " on the console without advancing.
If the counter is prime (via Wilson's theorem), write "" then the counter then " " on the console without advancing.
Repeat.
Repeat.