Pagini recente » Cod sursa (job #1873641) | Cod sursa (job #670732) | Cod sursa (job #2193664) | Cod sursa (job #2401199) | Cod sursa (job #602990)
Cod sursa(job #602990)
var s,p,k:int64;
procedure citire;
var c:char;f:text;
begin
assign(f,'text.in');
reset(f);
k:=0;p:=0;s:=0;
while not eof(f) do
begin
read(f,c);
if ((ord(c)>=65)and(ord(c)<=90))or((ord(c)>=97)and(ord(c)<=122)) then begin inc(s); inc(p);end else
if p>0 then begin inc(k); p:=0; end;
end;
if p>0 then inc(k);
close(f);
end;
procedure afis;
var f:text;
begin
assign(f,'text.out');
rewrite(f);
writeln(f,s/k);
close(f);
end;
begin
citire;
afis;
end.