Anybody know how fastest way to understand loop ? Sometimes my logic not match with output ?
Practice practice And practice..
thats right program flow and how loops flow..suppose there is a circle drawn.at one point of circle there is a condition check..and cycle starts from a point where condition is checked then it will do some code steps during the cycle and comes back to condition check point and will check condition to determine if another cycle required; if yes it will do cycle steps again and reaches condition check again..same can be visualized for nested loops by drawing a smaller circle for the loop which is inside a bigger main loop circle..when code enters in smaller loop it will complete all required cycles in smaller loop and comes back to bigger loop when all smaller loops are finished..then if the bigger loop requires the code to enter smaller loop..then again smaller loop will complete all its circles and when done code comes back to bigger circle..
First take the help of basic programmes understand the flow, then u can easily solve your problem
The thing is u have to practice...understand the flow of programme