100 DECLARE EXTERNAL FUNCTION GCD
110 FOR x=1 TO 100
120    FOR y=x TO 100
130       IF GCD(x,y)=1 THEN
140          LET z=SQR(x^2+y^2)
150          IF INT(z)=z THEN PRINT x,y,z
160       END IF
170    NEXT y
180 NEXT x
190 END
200 EXTERNAL FUNCTION GCD(a,b)
210 DO 
220    LET r=MOD(a,b)
230    IF r=0 THEN EXIT DO
240    LET a=b
250    LET b=r
260 LOOP
270 LET GCD=b
280 END FUNCTION  
    
    
