C Online Compiler
Example: C Program to Find Power of a Number using pow Function
C
C++
C#
Java
Python
PHP
main.c
STDIN
Run
// C Program to Find Power of a Number using pow Function #include <stdio.h> #include <math.h> int main() { int base, exponent, result = 1; printf("Enter the Base & Exponent values:\n"); scanf("%d%d", &base, &exponent); // It will finding the power of Base value // by equiping Exponent value result = pow(base, exponent); printf("\nResult: %d^%d = %d\n", base, exponent, result); return 0; }
6 8
Output
Clear
ADVERTISEMENTS