Pagini recente » Cod sursa (job #1832699) | Cod sursa (job #605123) | Cod sursa (job #213226) | Cod sursa (job #2540730) | 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.