Uses crt; var k,i,n,s:integer; istin:boolean; label 1,2; begin clrscr; k:=1; writeln ('vvedite chislo'); readln(n); 1:n:=n; for s:=2 to n-1 do begin if n mod s=0 then begin n:=n+1; goto 1; end else goto 2; end; 2:while k<100 do begin istin:=true; i:=3; while (i<=trunc(sqrt(n))) and istin do if n mod i=0 then istin:=false else i:=i+2; if istin then begin write(n,' '); k:=k+1; end; n:=n+2; end; readkey end.
var k,i,n,s:integer;
istin:boolean;
label 1,2;
begin clrscr;
k:=1;
writeln ('vvedite chislo');
readln(n);
1:n:=n;
for s:=2 to n-1 do begin if n mod s=0 then begin n:=n+1;
goto 1;
end else goto 2;
end;
2:while k<100 do begin istin:=true;
i:=3;
while (i<=trunc(sqrt(n))) and istin do if n mod i=0 then istin:=false else i:=i+2;
if istin then begin write(n,' ');
k:=k+1;
end;
n:=n+2;
end;
readkey
end.