Power Function
Syntax:
float powf(float base, float exp); double pow(double base, double exp); long double powl(long double base, long double exp);
Example:
#include <math.h> #include <stdio.h> int main() { int a=4,b=2; double x = 3.0, y = 2.0; printf("%f\n", pow(a, b)); printf("%f\n", pow(x, y)); return 0; }Back