Pagini recente » Cod sursa (job #2796112) | Cod sursa (job #2376946) | Cod sursa (job #2516520) | Cod sursa (job #2392883) | Cod sursa (job #130083)
Cod sursa(job #130083)
program alex;
var f:text;
l,nr:longint;
x,c:char;
begin
assign(f,'text.in');reset(f);
l:=0;
nr:=0;
c:=' ';
while not eof(f) do
begin
read(f,x);
case x of
'a'..'z','A'..'Z':l:=l+1
else if((c>='a')and(c<='z'))or((c>='A')and(c<='Z')) then nr:=nr+1;
end;
c:=x;
end;
close(f);
assign(f,'text.out');rewrite(f);
writeln(f,l div nr);
close(f);
end.