Cod sursa(job #290814)

Utilizator katamashCatalin Tamas katamash Data 28 martie 2009 19:39:42
Problema Text Scor 40
Compilator fpc Status done
Runda lame.contest Marime 0.34 kb
var x:char; c,l:longint;
f:text;
begin
assign(f,'text.in');reset(f);read(f,x);
while not(x in ['A'..'z']) do
      read(f,x);
c:=1;l:=1;
while not eof(f) do begin
      read(f,x);
      case x of
           'A'..'z': l:=l+1;
           '-',' ': c:=c+1;
      end; end;
close(f);assign(f,'text.out');rewrite(f);write(f,l div c);close(f);end.