C++ Math

#include <iostream>
#include <cmath>

int main() {
    // Step 1: Declare variables
    double base, exponent, result;

    // Step 2: Input values
    std::cout << "Enter the base: ";
    std::cin >> base;

    std::cout << "Enter the exponent: ";
    std::cin >> exponent;

    // Step 3: Calculate the result using the pow function from the cmath library
    result = pow(base, exponent);

    // Step 4: Display the result
    std::cout << "Result: " << result << std::endl;

    return 0;
}