Quantcast
Channel: EmotiCODE - Snippets and Source Code Search Engine
Viewing all articles
Browse latest Browse all 146

Discover if a number is prime.

$
0
0
The following is a neat way to determine if a number is prime or not extending the Fixnum class. Source: http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/

Viewing all articles
Browse latest Browse all 146

Trending Articles