Cod sursa(job #302286)

Utilizator costyv87Vlad Costin costyv87 Data 8 aprilie 2009 19:52:49
Problema Text Scor 30
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.39 kb
var s,cuv,con:qword;
    c:char;   f,g:text;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
while not eoln(f) do begin
read(f,c);
if (c in ['a'..'z']) or (c in ['a'..'z']) then begin
inc(cuv);
con:=0;
while not (eoln(f)) and ((c in ['a'..'z']) or (c in ['a'..'z'])) do begin inc(con); read(f,c); end;
s:=s+con;
end;
end;
write(g,s div cuv);
close(g);
end.