Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started