Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
May 27th, 2018
92
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.20 KB
| None
|
0
0
raw
download
clone
embed
print
report
# Find out if a number is prime
#
# Usage: 1.prime?
#
class Integer
def prime?
return false if self == 1
(2..(self-1)).each do |number|
return false if self % number == 0
end
true
end
end
Add Comment
Please,
Sign In
to add comment
Public Pastes
💲 G2A.com Free Gift Card Guide Mar 2024 💲
GetText | 2 min ago | 0.45 KB
Untitled
FreeBasic | 7 min ago | 0.37 KB
raven bug
Python | 8 min ago | 5.24 KB
вставка в лист
C++ | 31 min ago | 1.21 KB
Burger with Stacks
CSS | 31 min ago | 1.30 KB
Program Pengembangan Sistem Deteksi Banjir Be...
C++ | 40 min ago | 0.97 KB
BetterDamageForIsaac
Lua | 51 min ago | 0.93 KB
zad_daa
C++ | 52 min ago | 1.55 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!