Read the question again: it needs you do check N for a specific condition, which has three parts: your code doesn't even try to do that.
Think about the question, the
C library function - pow()[
^], and how you would do it manually. Try a couple of random numbers on paper and get a "feel" for the problem first.
If you are having problems getting started at all, then this may help:
How to Write Code to Solve a Problem, A Beginner's Guide[
^]