Pagini recente » Cod sursa (job #3251118) | Cod sursa (job #1533006) | Cod sursa (job #1359165) | Cod sursa (job #2991319) | Cod sursa (job #145415)
Cod sursa(job #145415)
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(n)) 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.