Skip to content

Instantly share code, notes, and snippets.

@sue445
Created August 11, 2012 07:42
Show Gist options
  • Save sue445/3322181 to your computer and use it in GitHub Desktop.
Save sue445/3322181 to your computer and use it in GitHub Desktop.
素数のときだけ"JOJO!"って出力するプログラム
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