How to find the power of a number
#include <stdio.h> #include <math.h> int main () { int base = 2; int exp = 6; int result; // Pass the base value and exp value as arguments, and use the pow() function to calculate the exp power of base result = pow ( base, exp); printf (" %d power of %d : %d ", exp, base, result); return 0; }
2^6 = 64 Process returned 0 (0x0) execution time : 2.198 s