Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted by freeze ( 17 years ago )
var
c, min, count,
tmp, x, ai, bi,
sum: integer;
BEGIN
sum:=0; min:=32767;
write('-> ');
repeat
read(c); x:=c; sum:=sum+c;
ai:=0; bi:=0;
if (c<>0) and (c<min) then min:=c;
repeat
tmp:=c mod 10; c:=c div 10;
if (tmp mod 2<>0) then ai:=ai+1;
else bi:=bi+1;
until (c=0);
if (ai=bi) then count:=count+1;
until (x=0);
writeln(' Сумма: ', sum);
writeln(' Мин.: ', min);
writeln('Удв. уÑл.: ', count);
END.
Revise this Paste