$i=2.0 , j=1.0$
while condition false at $i/j <= 0.001$
$i<= 0.001*j$
$j>=10^3 * 2$
Suppose loop executes for k iterations then value of $j = {2}^{k-1} $
and at ${(k+1)}^{th}$ iteration loop condition false then, $ j = {2}^{k} $
${2}^{k}>=10^3 * 2$
${2}^{k-1}>=10^3$
$k=11$ (which is same as no. of times loop executed or Lines of output printed.)