In my code I am not able to update value of i before updating value of c
https://ide.codingblocks.com/s/107558
Print series issue regarding output
Hello @akarshiarora.17,
You don’t need 2 loops. The condition will only depend on c and not i.
when a number is not a multiple of n2, print that number and increment c.
Increment i at every iteration regardless of the number being a multiple of n2 or not.
I have made the necessary changes to your code: https://ide.codingblocks.com/s/107600
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.