Greatest common divisor program without list Implementation

#Credits to NPTEL MOOC, Programming, Data Structures & Algorithms in 
#Python by Madhavan Mukund, Chennai Mathematical Institute 

def gcd(m,n):
  for i in range(1,min(m,n)+1):
    if (m%i) == 0 and (n%i) == 0:
      mrcf = i
  return(mrcf)

No comments: