Pagini recente » Cod sursa (job #2182663) | Cod sursa (job #754360) | Cod sursa (job #318596) | Cod sursa (job #2079033) | Cod sursa (job #506988)
Cod sursa(job #506988)
var cuv:string;
c:char;
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(g,s div j);
close(f);
close(g);
end.