Pagini recente » Cod sursa (job #1142325) | Cod sursa (job #698135) | Cod sursa (job #725115) | Cod sursa (job #2234794) | Cod sursa (job #727817)
Cod sursa(job #727817)
var f:text;
pre,c:char;
flag:boolean;
lit,m:longint;cuv:word;
begin
assign(f,'text.in');
reset(f);
cuv:=0;
flag:=true;
lit:=0;
read(f,c);
while (not eof(f))do
begin
if c in ['a'..'z','A'..'Z'] then begin
inc(lit);
flag:=true;
end
else if flag=true then
begin
inc(cuv);
flag:=false;end;
read(f,c);
if(eof(f))and(flag=true)then inc(cuv);
end;
close(f);
assign(f,'text.out');
rewrite(f);
if(cuv<>0) then begin
m:=lit div cuv;
write(f,m);
end;
close(f);
end.