Pagini recente » Cod sursa (job #1517578) | Cod sursa (job #2565209) | Cod sursa (job #2313164) | Cod sursa (job #2338392) | Cod sursa (job #1130023)
program pbtext;
var s,cuv:string;nr1,nr2,i:longint;f,g:text;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
while not(eof(f)) do
begin
read(f,s);
i:=1;nr1:=0;nr2:=0;
while i<=length(s) do
begin
cuv:='';
while ((s[i]<'a') or (s[i]>'z')) and ((s[i]<'A') or (s[i]>'Z')) and (i<=length(s)) do
i:=i+1;
while (((s[i]>='a') and (s[i]<='z')) or ((s[i]>='A') and (s[i]<='Z'))) and (i<=length(s)) do
begin
nr1:=nr1+1;
cuv:=cuv+s[i];
i:=i+1;
end;
if cuv<>''then nr2:=nr2+1;
end;
end;
if nr2=0 then writeln(g,0)
else
writeln(g,nr1 div nr2);
close(f);
close(g);
end.