Pagini recente » Cod sursa (job #713688) | Cod sursa (job #2571092) | Cod sursa (job #142738) | Cod sursa (job #3253457) | Cod sursa (job #1075740)
program submultimi;
var n,t,i:integer ;
b:array[1..50] of integer;
begin
assign(input,'submultimi.in');
reset(input);
assign(output,'submultimi.out');
rewrite(output);
readln(n);
b[1]:=1;
t:=0;
while t<>1 do
begin
for i:=1 to n do if b[i]=1 then write(i,' ');
writeln;
t:=1;
for i:=1 to n do
if t=1 then
if b[i]=0 then begin b[i]:=1; t:=0; end
else b[i]:=0;
end;
close(output);
readln;
end.