Skip to content

Instantly share code, notes, and snippets.


Shoko Kato s-tammy-kato

Block or report user

Report or block s-tammy-kato

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
s-tammy-kato / osyacode_fzbz.rb
Last active Apr 25, 2019
FizzBuzz with ruby
View osyacode_fzbz.rb
(1..ARGV[0].to_i).each do |i|
s = (i % 3).zero? ? 'Fizz' : ''
b = (i % 5).zero? ? 'Buzz' : ''
s << b
puts s.empty? ? i.to_s : s
View osyacode_gcd.rb
def mygcd(n, m)
return n if
mygcd(m, n % m)
puts mygcd(ARGV[0].to_i, ARGV[1].to_i)
You can’t perform that action at this time.