Created
August 11, 2012 07:42
-
-
Save sue445/3322181 to your computer and use it in GitHub Desktop.
素数のときだけ"JOJO!"って出力するプログラム
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "prime" | |
1.upto 100 do |num| | |
p num.prime? ? "JOJO!" : num | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment