Write the program to find the exponent (x>y)
Answers
Answered by
0
// C program to find the power of any number x^y using pow() function
#include <stdio.h>
#include <math.h>
// math.h header file included to pow() function
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;
}
:)
Similar questions