var
n, powerOfTwo: integer;
begin
write('Введите число N: ');
readln(n);
powerOfTwo := 1;
while powerOfTwo <= n do
write(powerOfTwo, ' ');
powerOfTwo := powerOfTwo * 2;
end;
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
var
n, powerOfTwo: integer;
begin
write('Введите число N: ');
readln(n);
powerOfTwo := 1;
while powerOfTwo <= n do
begin
write(powerOfTwo, ' ');
powerOfTwo := powerOfTwo * 2;
end;
end.