How to write a program using function for base, exponent in c language ??? | Sololearn: Learn to code for FREE!

+2

How to write a program using function for base, exponent in c language ???

I need a function which takes two arguments (base, exponent) and returns the value of base^exponent. Note: Without using inbuilt functions and assume that the base is always positive. Example Integerpower (2,0) = 1 Integerpower (2,4) = 16 Integerpower (2,-3) = 0.125

12/23/2020 9:19:26 AM

Krishanthan Krish

5 Answers

New Answer

+2

Here's a guide for the negative exponent https://www.mathsisfun.com/algebra/negative-exponents.html

0

https://code.sololearn.com/ca7Br5c41k11/?ref=app

-3