|
|
back to boardHELP ME PLEASE Господа, помогите, пожалуйста, новичку ликвидировать "access violation"! Here is 'access violation' error but i don't see anything wrong and my code works perfectly on my computer. Could anybody help? var a :array [1..1000] of integer; kol,s,ch,n,i,k,j,q:integer; begin readln(n); for i:=1 to n do read(a[i]); ch:=3; for i:=1 to n do begin if a[i]=1 then writeln('2'); kol:=0; k:=1; ch:=3; while k<a[i] do begin for s:=2 to (ch-1) do if ch mod s = 0 then kol:=kol+1; if kol=0 then k:=k+1; if k=a[i] then writeln(ch); ch:=ch+1; kol:=0; end;
end; end.
Edited by author 12.02.2016 23:11 |
|
|