Pagini recente » Cod sursa (job #2168667) | Cod sursa (job #583746) | Cod sursa (job #604938)
Cod sursa(job #604938)
program cuvinte;
var
s:string;
i,l,c:integer;
f,g:text;
begin
assign(f,'text.in');
assign(g,'text.out');
reset(f);
repeat
read(f,s);
for i:=1 to length(s) do
begin
if (s[i]<>'?') and (s[i]<>'!') and (s[i]<>'.') and (s[i]<>'-') and (s[i]<>',') and (s[i]<>' ') then
inc(l);
if (s[i]=' ') or (s[i]='-') and (i<>1)then
inc(c);
end;
until eof(f);
close(f);
rewrite(g);
writeln(g,l div c);
close(g);
end.