How to raise a number to an exponent in C | Sololearn: Learn to code for FREE!

+5

How to raise a number to an exponent in C

it seems x **y doesnt work in C, is there a way to do it?

12/24/2018 2:50:34 PM

Nyakotey🇬🇭🎹

6 Answers

New Answer

+10

Nyakotey try it this way --> pow(x,y). This means x raised to the power of y. Don't forget to #include <math.h> *Edited*

+9

Nyakotey you're welcome...Happy coding..😉😉😉

+7

*Asterisk* that is true...Thanks for the correction..

+3

+3

💫iYkE4LIFE💫 and Nyakotey it #include <math.h> he can use the pow(x,y); function.

+2

Rachid Bhf Life Please stop spamming. https://www.sololearn.com/discuss/1316935/?ref=app