Cod sursa(job #5184)
Utilizator | Data | 10 ianuarie 2007 20:49:14 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.65 kb |
Program cel;
var f,g:text;
c:char;
cuv,nr,k:longint;
Begin
Assign(f,'text.in');Reset(f);
Assign(g,'text.out');Rewrite(g);
cuv:=0;
nr:=0;
k:=0;
While not eof(f) do
Begin
Read(f,c);
If (c in ['a'..'z']) or (c in ['A'..'Z']) then Begin
inc(nr);
If k=0 then Begin
inc(k);
inc(cuv);
end;
end
else k:=0;
end;
Write(g,nr div cuv);
Close(f);
Close(g);
end.