再再次请求编一道Pascal程序题!!!

求100~200之间的所有素数。(循环语句)

var i,j:integer;

begin
for i:=100 to 200 do begin
for j:=2 to trunc(sqrt(i)) do
if i mod j=0 then break;
if i mod j<>0 then writeln(i);
end;
end.
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答