SET TALK OFF
CLEAR
sum1=0
FOR i=2 TO 100
prime=.T.
FOR j=2 TO i-1
IF MOD(i,j)=0 && 修改1
Prime=.F.
EXIT
ENDIF
ENDFOR
IF prime
?i
sum1=sum1+i
ENDIF
ENDFOR
?"100以内素数之和为:",sum1 && 修改2
SET TALK ON
RETU
SET TALK OFF
CLEAR
sum1=0
FOR i=2 TO 100
prime=.T.
FOR j=2 TO i-1
IF MOD(i,j)=0 && 修改1
Prime=.F.
EXIT
ENDIF
ENDFOR
IF prime
?i
sum1=sum1+i
ENDIF
ENDFOR
?"100以内素数之和为:",sum1 && 修改2
SET TALK ON
RETU