Check my code .....wrong output

i have change the greater then sign

Check now

you declare new variable because i value increses ? or any other value

or any other reason?

i variable was for the outer loop to iterate to all possible number.
So you must not modify or change its value inside the loop. So instead of directly working on i, you should copy it to a temp variable and then work on that

1 Like

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.