Why does pow(n,2) return 24 when n=5, with my compiler and OS?
Here is what may be happening here. You should be able to confirm this by looking at your compiler’s implementation of the pow function: Assuming you have the correct #include’s, (all the previous answers and comments about this are correct — don’t take the #include files for granted), the prototype for the standard pow function … Read more