Pagini recente » Statistici Sima Andreea (deea.yui) | Istoria paginii blog/cutremur-in-california | Istoria paginii utilizator/emmyly | Istoria paginii utilizator/pacurar_cristian | Cod sursa (job #604940)
Cod sursa(job #604940)
program cuvinte;
var
s:string;
i,l,c:integer;
f,g:text;
begin
assign(f,'text.in');
assign(g,'text.out');
reset(f);
read(f,s);
close(f);
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);
if (i=1) and (s[i]<>' ') and (s[i]<>'-') then
inc(c);
end;
rewrite(g);
writeln(g,l div c);
close(g);
end.