Pagini recente » Cod sursa (job #2678857) | Cod sursa (job #1126660) | Cod sursa (job #96912) | Cod sursa (job #1652031) | Cod sursa (job #1130050)
program pbtext;
var c:char;nr1,nr2,i:longint;f,g:text;cuv:string;
begin
assign(f,'text.in');reset(f);
assign(g,'text.out');rewrite(g);
nr1:=0;nr2:=0;
while not(eof(f)) do
begin
read(f,c);
cuv:='';
while (((c<'a') or (c>'z')) and ((c<'A') or (c>'Z'))) and (not(eof(f))) do
read(f,c);
while (((c>='a') and (c<='z')) or ((c>='A') and (c<='Z'))) and (not(eof(f))) do
begin
nr1:=nr1+1;
if length(cuv)<235 then
cuv:=cuv+c;
read(f,c)
end;
if cuv<>''then nr2:=nr2+1;
end;
if nr2=0 then writeln(g,0)
else
writeln(g,nr1 div nr2);
close(f);
close(g);
end.