Software Development
Pages
(Move to ...)
Home
About
Contact
▼
Friday, March 28, 2014
Checking if a number is prime in Ruby
Go to irb :
> require 'prime'
=> true
> Prime.prime?(2)
=> true
> Prime.prime?(3)
=> true
> Prime.prime?(10)
=> false
‹
›
Home
View web version