C++ Power Function

#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    double a, b, c;

    cout << "Enter Base : ";
    cin >> a;
    cout << endl;

    cout << "Enter Power : ";
    cin >> b;
    cout << endl;

    c = pow(a, b);

    cout << c << endl;

    return 0;
}

Comments