b=0; c=0; x=0; for a=1:100 x=x+(1/a); if(x>5) break; end b=a-1; for y=1:b c=c+1/(y); end end