Pagini recente » Cod sursa (job #1245295) | Cod sursa (job #1550158) | Cod sursa (job #3203852) | Cod sursa (job #289928) | Cod sursa (job #604948)
Cod sursa(job #604948)
program cuvinte;
var
ch:set of char;
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);
ch:=['a'..'z','A'..'Z'];
for i:=1 to length(s) do
begin
if s[i] in ch 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.