Mai intai trebuie sa te autentifici.
Cod sursa(job #265675)
Utilizator | Data | 24 februarie 2009 11:37:31 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
var s:string;
i,nr,cuv:integer;
f,g: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
inc(i);
if s[i]=' ' then
cuv:=cuv+1;
end;
assign(g,'text.out');
rewrite(g);
write(g,'Lungimea medie=',nr div (cuv+1));
close(g);
readln
end.