Mega Code Archive

 
Categories / C / Code Snippets
 

Calculate numeric power how to use pow

#include <stdio.h> #include <math.h> int main () { printf ("8 ^ 4 = %lf\n", pow ( 8 , 4 ) ); printf ("8.92 ^ 10 = %lf\n", pow (8.92, 10 ) ); printf ("36.45 ^ 1.96 = %lf\n", pow (36.45, 1.96)); return 0; }