正在做onlinejudge的题目,这题已经做了好久都不能通过,求指点
pascal吧
全部回复
仅看楼主
level 2
var i,a:byte;
begin
while not eof do
begin
readln(a);
for i:=2 to trunc(sqrt(a)) do
if a mod i=0 then begin
writeln('非质数'); writeln;
halt;
end;
writeln('质数')
end;
end.
答案说我不正确,真的要崩溃了。。求大神指点
2014年02月08日 06点02分 1
level 12
多换了一行也会判错的吧?不知道[呼~]
2014年02月08日 07点02分 2
1