Write a function power that expects two arguments x and n


Problem:

Question- Write a function power that expects (at least) two arguments x and n, and computes x to the power of n. You can use the C++ library function pow(double, double) inside the function. Write the following 2 versions:

double power1(double x, double n);

void power2(double x, double n, double& ans);

Implement the functions above in you main() program to demonstrate that they work accordingly.

Demonstrate your work in writing a function power that expects (at least) two arguments x and n.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a function power that expects two arguments x and n
Reference No:- TGS0894109

Expected delivery within 24 Hours