Power function in C come with pow(a, b);
available in double and float mode
|
float powf( float base, float exp );
|
||
|
double pow( double base, double exp );
|
||
|
long double powl( long double base, long double exp );
|
||
in order to get integer representation, you need to cast the double / float value into integer by simple casting
int(variable)
all you need to do to use this pow function is to add
#include <math.h>
to your program