+ 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

23rd Dec 2020, 9:19 AM
Krishanthan Krish
Krishanthan Krish - avatar
5 odpowiedzi
+ 2
Here's a guide for the negative exponent https://www.mathsisfun.com/algebra/negative-exponents.html
23rd Dec 2020, 10:36 AM
Ipang
0
https://code.sololearn.com/ca7Br5c41k11/?ref=app
29th Dec 2020, 6:46 PM
Krishanthan Krish
Krishanthan Krish - avatar
- 3
gayhs
24th Dec 2020, 6:23 PM
ؤتہبہقہيہ آحہسہنہ
ؤتہبہقہيہ آحہسہنہ - avatar