Mark McDougall wrote: Even faster in BASIC... 10 FOR A=2 TO 333 20 A2=A*A; C=500 30 FOR B=500-A TO (1000-A)/2 40 IF A2+B*B=C*C THEN 100 50 C=C-1 60 NEXT B,A 100 ' print result Regards, -- | Mark McDougall | "Electrical Engineers do it | <http://members.iinet.net.au/~msmcdoug> | with less resistance!"