Mai intai trebuie sa te autentifici.

Cod sursa(job #265694)

Utilizator yoannaserb ioana yoanna Data 24 februarie 2009 11:52:11
Problema Text Scor 0
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.37 kb
var s:string;
    i,nr,cuv:integer;
    f:text;
begin
assign(f,'text.in'); reset(f);
nr:=0;
cuv:=0;
i:=0;
while not eoln(f) do
begin
read(f,s[i]);
if (s[i]>='A') and (s[i]<='z') then
nr:=nr+1;
inc(i);
end;
i:=1;
while i<=length(s) do
begin
if (s[i]=' ') or (s[i]='-') then
cuv:=cuv+1;   inc(i);
end;
write('Lungimea medie=',nr div (cuv+1));
readln
end.