Pagini recente » Cod sursa (job #614994) | Cod sursa (job #712611) | Cod sursa (job #375270) | Cod sursa (job #471901) | Cod sursa (job #506986)
Cod sursa(job #506986)
var cuv:string;
c:char;
i,j,s:integer;
f,g:text;
begin
assign(f,'text.in');
reset(f);
assign(g,'text.out');
rewrite(g);
cuv:='';
j:=0;
s:=0;
while not eoln(f) do
begin
read(f,c);
if ((c>='A') and (c<='Z') or (c>='a') and (c<='z')) then
begin
cuv:=cuv+c;
inc(s);
end
else if cuv<>'' then
begin
inc(j);
cuv:='';
end;
end;
writeln(s div j);
readln;
end.