Pagini recente » Cod sursa (job #2594378) | Cod sursa (job #2703737) | Cod sursa (job #2312205) | Cod sursa (job #506708) | Cod sursa (job #90511)
Cod sursa(job #90511)
var s:char;
f,g:text;
n,x,i,c,w:longint;
ok:boolean;
begin
assign(f,'text.in');
assign(g,'text.out');
reset(f);
rewrite(g);
c:=0;
x:=0;
repeat
i:=0;
ok:=false;
repeat
read(f,s);
if (s<>' ') and (s<>',') and (s<>'-') and (s<>'.') and (s<>'!') and (s<>'?') then begin
i:=i+1;
ok:=true;
end;
until (s=' ') or (eof(f)) or (s='-') or (s=',') or (s='.');
if ok then begin
x:=x+i;
c:=c+1;
end;
until (eof(f));
write(g,x div c);
close(f);
close(g);
end.