*Find power of a number ( x^n ) using pow function*

*Find power of a number ( x^n ) using pow function*

Write a C program to find power of a number ( x^n ) using pow function. Here’s simple program to find power of a number ( x^n ) using pow function in C Programming Language.

Write a C program to input any two numbers x and y and find their power using inbuilt pow() function. How to find power of two numbers in C programming. How to use pow() function in C programming. C program to compute power of two numbers using predefined library function.

Below is the source code for C program to find power of a number ( x^n ) using pow function which is successfully compiled and run on Windows System to produce desired output as shown below :

**SOURCE CODE : :**

**SOURCE CODE : :**

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /* C program to find power of a number ( x^n ) using pow function */ #include <stdio.h> #include <math.h> int main() { int x,n; int result; printf("Enter the value of base: "); scanf("%d",&x); printf("\nEnter the value of power: "); scanf("%d",&n); result =pow((double)x,n); printf("\n%d to the power of %d is= %d", x,n, result); return 0; } |

**OUTPUT : :**

**OUTPUT : :**

1 2 3 4 5 | Enter the value of base: 4 Enter the value of power: 4 4 to the power of 4 is= 256 |

Above is the source code for C program to find power of a number using pow function which is successfully compiled and run on Windows System.The Output of the program is shown above .

If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may * Contact Us* through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.

**Thanks for reading the post….**