Pagini recente » Cod sursa (job #153278) | Cod sursa (job #2310218) | Cod sursa (job #376238) | Cod sursa (job #2192029) | Cod sursa (job #979249)
Cod sursa(job #979249)
program asdfa;
var s:string;
i,n,t,cuv,r:longint;
f,g:text;
begin
assign(f,'text.in');reset(f);
read(f,s);
close(f);
n:=length(s);
t:=0; cuv:=1;
for i:=1 to n do
begin
if (s[i]<>' ') and (s[i+1]=' ') then
cuv:=cuv+1;
if ((s[i]>='A') and (s[i]<='Z')) or ((s[i]>='a') and (s[i]<='z')) then
t:=t+1;
end;
if s[n]=' ' then
cuv:=cuv-1;
assign(g,'text.out');
rewrite(g);
r:=t div cuv;
write(g,r);
close(g);
end.