Program to find power of any number in c-language

Program to find power of any number in c-language

#include<stdio.h>
#include<math.h>
int main()
{
    int a,b,p;
    printf("Enter base number\n");
    scanf("%d",&a);
    printf("Enter power\n");
    scanf("%d",&b);
    p=pow(a,b);
    printf("Power of the number =%d",p);
}

OUTPUT
Enter base number
2
Enter power
3
Power of the number=8

This program is perfect example of pow function and also describe the math.h header files.
By using this function you can find any power of any number.

If you like this program then you can share it and for any issues you can direct contact with me from Home Page.

For regular updates you can also follow my site.

Comments

Popular posts

Creative pattern of butterfly in C-language

Syntax of C-language

Program to see all ASCII value using for loop in C-language

Language Translator of C-language

Introduction of C-language.

Creative Pattern of Rhino in C-language

Binary searching in C-language

Program to see ASCII symbol by entering number in C-language

Variable & Datatype for C-programming