篩選法找素數程序vara:array[1..10000]ofboolean;i,j:integer;beginfori:=1to10000doa[i]:=true;fori:=2to5000dobeginifa[i]thenforj:=2totrunc(10000/i)doa[i*j]:=falseend;j:=0;fori:=2to10000doifa[i]thenbeginwrite(i:5);j:=j+1;ifjmod5=0thenwriteln;end;end.2,篩選法數學篩選法又稱篩法,是...
更新時間:2023-07-11標簽: 篩選篩選法素數程序篩選法 全文閱讀