Cod sursa(job #178585)

Utilizator radupoenaruPoenaru Radu Constantin radupoenaru Data 14 aprilie 2008 19:48:37
Problema Text Scor 30
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.34 kb
const m:set of char=['a'..'z','A'..'Z'];
var nrl,nrc:integer;
    f:text;
    c:char;
begin
assign(f,'text.in');reset(f);
nrl:=0;
nrc:=0;
while not eof(f) do begin
      read(f,c);
      if c in m then inc(nrl)
                else inc(nrc);
      end;
close(f);
assign(f,'text.out');rewrite(f);
write(f,trunc(nrl/nrc));
close(f)
end.