how to do exponentiation in c++ code example
Example: exponents c++
pow(base, exponent); //must #include <cmath> to use pow()
example:
#include <iostream>
#include <cmath> //must include this library
int main ()
{
int y;
int x =10;
y = pow(x,2); // y = x^2
}