Hi Sonir : write it this way i=0;j=0;k=0 counter will be 0(1) i=0;j=0;k=1 break's out i=1;j=0;k=0 counter will be 1(2) i=1;j=0;k=1 break's out i=1;j=0;k=0 counter will be 2(3) i=1;j=0;k=1 break's out i=2;j=0;k=0 counter will be 3(4) i=2;j=0;k=1 break's out So the answer 3 will be printed. Hope this helps -A
first ......i=0 j=0 k=0, counter =1 second ........... k=1, break middle and enter outer third ...... i=1 j=0 k=0 counter =2 fourth ........... k=1 break middle and enter outer fifth i=2 j=0 k=0 counter =3 ......... k=1 break middle and enter outer and it stops as i cannot be incremented further. hope this helps....
Options : 1)2 2)3 3)6 4)7 5)9 I tried running the code and got the output as 3. Can any one make me understand the flow of the code? Sonir[/qb]<hr></blockquote> [ January 23, 2002: Message edited by: mark stone ]
Make yourself as serene as a flower, as a tree. And on wednesdays, as serene as this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!