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

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)

Source link

Greatest common divisor program without list Implementation

Leave a Reply

Your email address will not be published. Required fields are marked *