program panduan;var i,n:longint;f:boolean;begin readln(n);{输入那个数} f:=true; for i:=2 to trunc(sqrt(x)) do
if n mod i =0 then
begin
f:=false;break;
end;
if f then writeln('yes') else writeln('no');end. 如有疑问给我留言...
function zhishu(x:integer):boolean;var i:integer;begin if (x=0) or (x=1) then exit(false); if x=2 then exit(true); for i:=2 to trunc(sqrt(x)) doif x mod i=0 then exit...
function zs(a:integer):boolean;var i:integer;beginzs:=false;for i:=2 to trunc(sqrt(a)) doif a mod i=0 then exit;if a>1 then zs:=true;end;如果函数值是true,就表示a是质数如果函数值...