Cod sursa(job #290909)

Utilizator katamashCatalin Tamas katamash Data 28 martie 2009 22:27:20
Problema Text Scor 70
Compilator fpc Status done
Runda lame.contest Marime 0.39 kb
var x:char; c,l:longint;
f:text; ok:boolean;
begin
assign(f,'text.in');reset(f);read(f,x);
c:=0;l:=0;ok:=false;
while not eof(f) do begin
      read(f,x);
      if x in ['A'..'z'] then begin l:=l+1; ok:=true; end
         else if ok=true then begin c:=c+1; ok:=false; end;
       end;
if x in ['A'..'z'] then c:=c+1;
close(f);assign(f,'text.out');rewrite(f);write(f,l div c);close(f);end.