Укажите наибольшее число x, при вводе которого алгоритм печатает сначала 5, а потом 8. var x, L, M: integer;
begin
readln(x);
L := 0; M := 0;
while x > 0 do begin
M := M + 1;
if x mod 2 <> 0 then
L := L + 1;
x := x div 2;
end;
writeln(L);
writeln(M);end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Copyright © 2024 SCHOLAR.TIPS - All rights reserved.