Welcome, guest! Login / Register - Why register?
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('    &ETH;&iexcl;&Ntilde;ƒ&ETH;&frac14;&ETH;&frac14;&ETH;&deg;: ', sum);
   writeln('     &ETH;œ&ETH;&cedil;&ETH;&frac12;.: ', min);
   writeln('&ETH;&pound;&ETH;&acute;&ETH;&sup2;. &Ntilde;ƒ&Ntilde;&ETH;&raquo;.: ', count);
END.

 

Revise this Paste

Your Name: Code Language: