PDA

Click to See Complete Forum and Search --> : > Math in C++ > Power


prog_tom
Jan 16th, 2002, 12:01 PM
> Math in C++ > Power

>>> Does anyone know how to get the Nth power of the variable A? let's say N=15, A=15, then 15^15 is the answer.
Anyone know how to do that in C++? In Win32 and in Console.,

Wynd
Jan 16th, 2002, 01:16 PM
#include <cmath>
using namespace std;

// ...

pow(x, y);
Hope that helps :)