Pagini recente » Cod sursa (job #1459830) | Cod sursa (job #1989792) | Cod sursa (job #1018630) | Cod sursa (job #2564221) | Cod sursa (job #859182)
Cod sursa(job #859182)
var s:char; p,k:longint; ok:boolean;
f,g:text;
begin
p:=0;
k:=0;
assign(f,'text.in');reset(f); ok:=false;
assign(g,'text.out');rewrite(g);
while not eof(f) do begin
read(f,s);
if ((s>='A')and(s<='Z'))or((s>='a')and(s<='z')) then begin inc(k); ok:=true;end
else begin if ok=true then begin inc(p);ok:=false;end;end;end;
write(g,trunc(k/p));
close(f);
close(g);
end.