Pagini recente » Cod sursa (job #771588) | Cod sursa (job #2861699) | Cod sursa (job #1116405) | Cod sursa (job #3267456) | Cod sursa (job #979258)
Cod sursa(job #979258)
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;
assign(g,'text.out');
rewrite(g);
r:=t div cuv;
write(g,r);
close(g);
end.