Ask Question

Use C++:

Assume the following variable definitions appear in a program:

double base = 10.0;

double result;

1. Write a statement that uses the pow function to raise the base variable to the power of 5, and assigns the result to the result variable. (Assume that the program includes the necessary header file for the pow function.)

+3
Answers (1)
  1. 25 November, 04:57
    0
    result = pow (10,5);

    Explanation:

    A complete code in C+ + with the necesary header file for the math class is given below:

    #include

    //import the header file to use the power function

    #include

    using namespace std;

    int main ()

    {

    double base = 10.0;

    double result;

    //Use Power function to raise base to power of 5

    result = pow (10,5);

    //print out the result

    cout<
    return 0;

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Use C++: Assume the following variable definitions appear in a program: double base = 10.0; double result; 1. Write a statement that uses ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers