how to raise the power of some number

like 5raise to the power 9

7th Jul 2016, 9:46 AM
5 Answers
+ 1
Use the pow function located in cmath.
7th Jul 2016, 11:50 AM
Garme Kain
Garme Kain - avatar
I don't understand ur question
7th Jul 2016, 10:29 AM
the power exponents or power as inter additions
7th Jul 2016, 9:34 PM
Shumilov Artem
Shumilov Artem - avatar
Use pow(power, number). To use pow add #include<math.h>. Example: For the square of 3 pow(2,3);
8th Jul 2016, 1:42 AM
Surya Vamsi
Surya Vamsi - avatar
multiply it by itself...... //here a is the no. and b is the power /* I made a function power that asks the input for then. and it's power and returns the vmalue of a to the power b*/ int power(int a,b){ int n=0; while (n<b){ a=a*a; n++; } if (b=0){ a=1; } return a; }
8th Jul 2016, 4:37 PM
Abbas Tailor