Question: t power (int base, int exponent). e function MUST use a for loop and use the same methodology we used in class. e main difference

t power (int base, int exponent). e function MUST
t power (int base, int exponent). e function MUST use a for loop and use the same methodology we used in class. e main difference is e code is contained within a function. nt want to hardcode numbers nclude ing namespace std; t power (int base, int exp) { //result cant be initilized to @ because when we do result* base it will do base int result = 1; //does 3*3*3*3 since cant print 3/4 for (int i = 0; i

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 Mathematics Questions!