孪生素数对

作者在 2017-09-05 13:36:42 发布以下内容
clear
a=3
b=a
?"孪生素数对:"
for i=3 to 100 step 2
    x=0
    for j=2 to i-1
        if i/j=int(i/j)
           x=1
        endif
    endfor 
    if x=0
       a=i
       if a-b=2
           ?b,a
       endif
       b=a
    endif
endfor
算法 | 阅读 1449 次
文章评论,共0条
游客请输入验证码
浏览376939次