用VFP求100到200之间的素数的个数?求的是个数!不是具体的数

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 16:31:32
用VFP求100到200之间的素数的个数?求的是个数!不是具体的数

用VFP求100到200之间的素数的个数?求的是个数!不是具体的数
用VFP求100到200之间的素数的个数?
求的是个数!不是具体的数

用VFP求100到200之间的素数的个数?求的是个数!不是具体的数
lflag=.f.
ntime=0
nadd=0
for i=100 to 200
for j=2 to i
if int(i/j)=i/j
ntime=ntime+1
endif
endfor
if ntime=1
nadd=nadd+1
endif
ntime=0
endfor
nadd