Can't figure out the mistake

Can anyone check this solution and tell me what’s wrong? Has to be the easiest problem I’ve seen on this site and yet I can’t get the output!?!

There is one thing wrong in your code. Instead of returning 0 in your if condition use continue. That will do the trick.

1 Like

That was a good spot! but still getting wrong answer!

you did not use “\n” in the first printf statement.that caused the error

@jsk1_s same as @anshkhanna7