看错了,我以为你说求和.
set talk off
clear
s=0
for i = 3 to 200
if mod(i,2) 0 and notsu(i)
s = s + 1
endif
endfor
set talk on
return
function notsu(x)
for j=2 to sqrt(x)
if x%j=0
return(.t.)
endif
endfor
if j>sqrt(x)
return(.f.)
endif
endfunc
看错了,我以为你说求和.
set talk off
clear
s=0
for i = 3 to 200
if mod(i,2) 0 and notsu(i)
s = s + 1
endif
endfor
set talk on
return
function notsu(x)
for j=2 to sqrt(x)
if x%j=0
return(.t.)
endif
endfor
if j>sqrt(x)
return(.f.)
endif
endfunc