Remember to checkout the Codesnip below to review the C++ code yourself! Feel free to copy the code, but I ask that you please provide credit if you leave the code unchanged when you use it.
//Programmer: Nazmus //Program: Pow //Purpose: To learn exponents in C++ //Website: EasyProgramming.net #include<iostream> #include<cmath> using namespace std; int main() { cout << "Today we learn the Power Function." <<endl<<endl; float a, b, c; cout << "Please enter the base: "; cin >> a; cout << "Please input the exponent (to the power of): "; cin >> b; c = pow(a, b); cout << a << " to the power of " << b << " equals to " << c << '.' << endl << endl; system("pause"); }