1 REM Program EUCLID
2 REM Greatest Common Factor of 2 Nos.
10 Input "2 Integers";N,D
15 If N=0 then END
20 Remainder=N-D*INT(N/D)
21 If Remainder=0 then 30
22 N=D
23 D=Remainder
 24 goto 20 :REM loop until zero
30 print:print "G.C.F. is ";D
31 print:print
32 goto 10:REM try another pair
