Pagini recente » Cod sursa (job #2670872) | Cod sursa (job #2887913) | Cod sursa (job #1884137) | Cod sursa (job #1937104) | Cod sursa (job #835712)
Cod sursa(job #835712)
Var f,g:text;
s:string;
a,i,b,c:integer;
Begin
assign(f, 'text.in');reset(f);
assign(g, 'text.out');rewrite(g);
read(f, s);
a:=length(s);
for i:=1 to a do
begin
if (s[i]<>' ') and (s[i]<>'-') and (s[i]<>'!') and (s[i]<>'?') and (s[i]<>',') then inc(b);
if (s[i]=' ') or (s[i]=',') or (s[i]='-') then inc(c);
end;
c:=c-2;
write(g, trunc(b/c));
close(f);
close(g);
End.