不是VIP会员,不能显示答案

题目解答

题目:
program test_2012_5;
var j,k:integer;
function pr(n:integer):boolean;
var i:integer;t:boolean;
begin
t:=true;i:=2;
while t and (i<=sqrt(n)) do
if n mod i=0 then t:=false
else i:=i+1;
pr:=t;
end;
begin
k:=0;j:=11;
while j<=99 do
begin
if pr(j) and pr(j+2) then
begin writeln(j:4,j+2:4);k:=k+1;end;
j:=j+2;
end;
writeln(‘total:',k);
end.

输出:11 13
17 19
29 31
41 43
59 61
71 73
total:6
考点:
分析:
解答:
评论:
老师: