gcd.rb
def gcd1(a, b)
  t = [a, b].min

  t.downto(1) do |t|
    t # just evaluate the expression so that RubyLabs#count works properly
      # as the next statement isn't counted otherwise
    return t if a % t == 0 && b % t == 0
  end
end
# brute force algorithm
#
# :begin :gcd1
brute force algorithm
:begin :gcd1
brute force algorithm : begin : gcd1
def gcd1(a, b)
  t = [a, b].min
  t.downto(1) do |t|
    t 
    return t if a % t == 0 && b % t == 0
  end
end
def gcd1 ( a , b ) t = [ a , b ] . min t . downto ( 1 ) do | t | t return t if a % t == 0 && b % t == 0 end end
brute force algorithm
:begin :gcd1
brute force algorithm : begin : gcd1
# just evaluate the expression so that RubyLabs#count works properly # as the next statement isn't counted otherwise
a
b