home *** CD-ROM | disk | FTP | other *** search
- REM Program EUCLID
- REM Greatest Common Factor of 2 Nos.
- 10 Input "2 Integers";N,D
- If N eq 0 then STOP
- 20 Remainder=N-D*INT(N/D)
- If Remainder eq 0 then 30
- N=D
- D=Remainder
- go to 20 REM loop until zero
- 30 print:print "G.C.F. is ";D
- print:print
- go to 10 REM try another pair
-