I'm making a simple calculator, and wanted to add power.
I've tried Pow()
and did not, do you need to add some class?
I'm making a simple calculator, and wanted to add power.
I've tried Pow()
and did not, do you need to add some class?
Pow
, it is pow
. Case-sensitive make a difference in C ++
And the library is math
:
#include <math.h>
int main ()
{
printf ("5 ^ 3 = %f\n", pow(5.0, 3.0));
return 0;
}
See working at IDEONE .