укажите наименьшее х,при вводе которых алгоритм печатает сначала 4,а потом 0
var x,a,b,c:integer;
begin
readln(x);
a:=0;b:=0;
while x>0 do begin
c:=x mod 2;
if c=0 then a:=a+1
else b:=b+1;
x:=x div 10;
end;
writeln(a);writeln(b);

end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.