{$U+,C-}

MODULE _GCD;


USE
	iostd,math,putnum;


SUB gcd VAR f*,g*;
  WHILE f <> g DO
    IF f < g THEN
      @g = g - f
    ELSE
      @f = f - g
    FI
  WEND
  f
RET


VAR
  x<84>,y<36>;

SUB main;
  putstring 'x = ';putword(x);cr;
  putstring 'y = ';putword(y);cr;
  putstring 'nok = ';putword(gcd(x,y));cr;
RET

END
