Cod sursa(job #294374)

Utilizator krissu93FMI Tiugan Cristiana Elena krissu93 Data 2 aprilie 2009 14:53:24
Problema Text Scor 80
Compilator fpc Status done
Runda infoexpert Marime 0.51 kb
var a:char;
    f:text;
    ltotal,nrcuv:longint;
begin
assign(f,'text.in');
reset(f);
ltotal:=0;
nrcuv:=0;
While not eof(f) do
begin read(f,a);
      while (ord(a)<64) or (ord(a)>122) or ((ord(a)>90) and (ord(a)<97)) do
           read(f,a);
      While  ((ord(a)>64) and (ord(a)<91)) or ((ord(a)>96) and (ord(a)<123))  do
        begin inc(ltotal);
              read(f,a);
         end;
         inc(nrcuv);
end;
close(f);
assign(f,'text.out');
rewrite(f);
write(f,ltotal div nrcuv);
close(f);
end.