      PROGRAM GCD
      integer m, n, r
10    print *, 'Please give values for m and n'
      read *, m, n
20    if (n .eq. 0) go to 30
      r = mod(m,n) 
      m = n
      n = r
      go to 20
30    print *, 'gcd = ', m
      go to 10
      end
