Cod sursa(job #92889)

Utilizator borsosborsos adrian borsos Data 16 octombrie 2007 20:34:01
Problema Text Scor 100
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.92 kb
var f,g:text;
    maxcuv,maxlit:longint;
    a:char;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
maxcuv := 0;
maxlit := 0;
while not eof(f) do begin

            while not eoln(f) do begin
                  read(f,a);
                  if ((ord(a) > 64)and(ord(a) < 91)) or
                     ((ord(a) > 96)and(ord(a) < 123)) then
                             begin

                         while  ((ord(a) > 64)and(ord(a) < 91)) or
                     ((ord(a) > 96)and(ord(a) < 123)) do begin
                                           inc(maxlit);
                                           read(f,a);
                                                         end;
                         inc(maxcuv);
                             end;
                                   end;
            readln(f);
                      end;
writeln(g,maxlit div maxcuv);
close(f); close(g);
end.