Pagini recente » Cod sursa (job #3137719) | Cod sursa (job #3002552) | Cod sursa (job #2479017) | Cod sursa (job #1508511) | Cod sursa (job #601348)
Cod sursa(job #601348)
Program text_3;
var ch:char;
s:set of char;
k,l,m:longint;
fi,fo:text;
begin
assign(fi,'text.in');
reset(fi);
assign(fo,'text.out');
rewrite(fo);
s:=['a'..'z','A'..'Z']; m:=0; k:=0;
while not eof(fi) do begin
read(fi,ch);
if ch in s then inc(l)
else
if (ch in [chr(0)..chr(127)]-s) and (l>0) then begin
inc(k);
m:=m+l;
l:=0;
end;
end;
writeln(fo,m div k);
close(fo);
end.