Pagini recente » Cod sursa (job #3282123) | Cod sursa (job #694097) | Cod sursa (job #2962147) | Cod sursa (job #2523668) | Cod sursa (job #57829)
Cod sursa(job #57829)
program text1;
var f:text;
nrc,l,lc:longint;
x:char;
begin
assign(f,'text.in'); reset(f);
while not eof(f) do
begin
read(f,x);
if ((x in ['a'..'z'])
or (x in ['A'..'Z']))
then begin
lc:=lc+1;
if lc=1 then nrc:=nrc+1;
end
else if lc<>0 then
begin
l:=l+lc;
lc:=0;
end;
end;
close(f);
assign(f,'text.out'); rewrite(f);
writeln(f,int(l/nrc):0:0);
close(f);
end.