Cod sursa(job #608505)

Utilizator GRazvanGorgan Razvan-Florin GRazvan Data 16 august 2011 23:29:37
Problema Text Scor 90
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.43 kb
program textulet;
var f:text;c:char;cuv,lit:longint;
begin
 assign(f,'text.in');
 reset(f);
 while not eof(f) do
 begin
   read(f,c);
   if upcase(c) in ['A'..'Z'] then
   begin
     cuv := cuv + 1;
     while (upcase(c) in ['A'..'Z']) and (not eof(f)) do
     begin
      lit := lit + 1;
      read(f,c);
     end;
   end;
 end;
 close(f);
 assign(f,'text.out');
 rewrite(f);
 write(f,lit/cuv);
 close(f);
end.