Skip to content

Commit

Permalink
Keeps printing prime number (theoretically) forever.
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhasKamal authored Dec 11, 2017
1 parent b05c6df commit 9096bc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions signature_prime.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Developer- Minhas Kamal (https://minhaskamal.github.io)
// Intro- Keeps printing prime number (theoretically) forever. Number of characters- 61.
// Intro- Keeps printing prime number (theoretically) forever. Number of characters- 60.
// Can be made shorter (53 bytes)- main(m,k){for(;m%k--?:(k=m++);k^1?:printf("%i|",m));}
// Details- https://www.quora.com/What-is-the-shortest-and-most-effective-code-ever-written/answer/Minhas-Kamal?srid=u2HNX

_=1;main($){for(;_%$?:(_+=$=1);++$*$<=_?:printf("%i|",$=_));}
_=1;main($){for(;_%$?:(_+=$=1);++$*$>_&&printf("%i|",$=_));}

0 comments on commit 9096bc4

Please sign in to comment.