Pagini recente » Cod sursa (job #1361827) | Cod sursa (job #2184486) | Cod sursa (job #2991122) | Cod sursa (job #617651) | Cod sursa (job #145407)
Cod sursa(job #145407)
const max=10000;
var v:array[1..max] of byte;
i,j,n,c:integer;
begin
assign(input,'ciur.in');reset(input);
assign(output,'ciur.out');rewrite(output);
readln(n);
for i:=2 to trunc(sqrt(max)) do
if v[i]=0 then
for j:=2 to max div i do
v[i*j]:=1;
for i:=2 to n do begin
if v[i]=0 then write(i,' ');
end;
close(input);close(output);
end.