Search titles only
Install the app
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
Reply to thread
[QUOTE="Vishal Jamdagni, post: 5166659, member: 85165"] The main thing you'll have to remember for here is that the update expression or even called as the loop iteration part takes place after the body of the loop is executed... so, let's take a look at the dry run: i is initialized to 1 next, x is updated as solve the expression within the brackets which gives us (1*1+3) this becomes 4. Hence x gets the value of 4. Then comes the standard printing procedure. After this increment and use the value of i which now becomes 2. Now, bracket expression becomes (2*2+3) which is 7 now add the value of x to this which is 4, resulting in x becoming 11 and similarly it goes on. Hope this helps. Cheers [/QUOTE]