Например так:
var
N, S: word;
begin
S := 1;
Read (N);
while S <= N do
Write (S, ' ');
S := S * 2;
end
end.
Например так:
var
N, S: word;
begin
S := 1;
Read (N);
while S <= N do
begin
Write (S, ' ');
S := S * 2;
end
end.