Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • Works fine for me after I replace the return value of main() with "int". I didn't expect it to work, though, as <stdio.h> and <math.h> are usually used instead of "stdio.h" and "math.h". But it looks like GCC doesn't really care. Commented Jan 30, 2011 at 14:18
  • 8
    @Abid It's often good to edit questions, but in this case the edits have made the question meaningless (you have replaced the problem with the solution). It's better to leave the original questions so others can learn - but it's now just confusing (There is no "^" in the question). Suggest you revert to the last edit that makes sense as a question Commented Jan 30, 2011 at 14:25
  • 8
    Changed back to using ^ since the question (and answers) make little sense otherwise. Since peoro answered correctly for your question, you should accept it and move on. If you have another question, then please ask another question. Don't edit this one to make all the work done meaningless. Commented Jan 30, 2011 at 14:30
  • @sergey Tchenov.. how did your program worked?? please explain Commented Jan 30, 2011 at 14:34
  • 1
    @Sergey Tachenov: Oh, I see now that you used pow()? I thought you got the OP's original code (with ^ for pow) to work. Commented Jan 30, 2011 at 15:04