Pagini recente » Istoria paginii utilizator/danhumeniuc | Cod sursa (job #302092) | Istoria paginii utilizator/matei140401 | Cod sursa (job #117540) | Cod sursa (job #593940)
Cod sursa(job #593940)
var s:char;
l,nr,i:longint;
f,g:text;
begin
assign(f,'text.in');
reset(f);
assign(g,'text.out');
rewrite(g);
l:=0;
nr:=0;
while not eof(f) do
begin
read(f,s);
if ((s>='a') and (s<='z')) or ((s>='A') and (s<='Z')) then
begin
inc(nr);
while ((s>='a') and (s<='z')) or ((s>='A') and (s<='Z')) do
begin
inc(l);
read(f,s);
end;
end;
end;
writeln(g,l div nr);
close(f);
close(g);
end.