Question: please write in c and leave comments Without using the pow ( ) in math.h , write a C program which calculates base power exponent

please write in c and leave comments
Without using the pow() in math.h, write a C program which calculates base power exponent by taking the following specifications into consideration.
Base can take an integer value or a float, while exponent can only be an integer.
Restrict both base and exponent to be in between -5 and 5. Prompt the user to
re-enter values if invalid inputs are provided.
If both base and exponent are 0, display an appropriate message as shown in the
sample run, and exit the program.
Sample Run 1:
Enter base and exponent: 3.15
Result is 286.29151
Sample Run 2:
Enter base and exponent: -0.353
Result is -0.042875
Sample Run 3:
Enter base and exponent: 4.23-4
Result is 0.00312
Sample Run 4:
Enter base and exponent: 00
0 power 0 is invalid
Sample Run 5:
Enter base and exponent: -3-4
Result is 0.012345
please write in c and leave comments Without

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