Question: You are required to write a C++ program in your favorite IDE that takes a base and exponent from the user and finds its power.

 You are required to write a C++ program in your favorite

You are required to write a C++ program in your favorite IDE that takes a base and exponent from the user and finds its power. For example, if user enters base-2 and exponent=3 the result should be 8. Please note the following: You can assume that user always inputs +ve integer for base and exponent. You are required to use pointers to solve this lab exercise. Create a function called, void power(int base, int exponent, int #result), where result is the result of the power function, e.g., if base-2, exponent=3, result should be 8. Below is the screenshot of the expected output of this program: Microsoft Visual Studio Debug Console Enter the Base value: 2 Enter the Exponent value: 3 Result: 8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!