the initial values are 2 for both “no” and “i”
and the condition for the inner most loop is that i<no, which is not satisfied if both i and no are = 2 so it should not print 2
I think 2 should not get printed according to this code but it is so how is that happening?
Yes this is correct
but we are not printing no inside inner loop
we are printing number outside inner loop hence 2 will also printed
i hope you understood the point
if yes then let me know
if not feel free to ask
yess thankuuu got it now
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.