POW(X,Y) | How to use it | Python Program

pow(x,y): 

It is power of variables in mathematical function found in #include<math.h> header file.
Example:     4^2=16
Here, x=4 and y=2.
The function use in as pow(variable,variable); 


How to use:

1.First use header file and library file.
2.Then, use function.

Print Power of a number:

code:

#include<stdio.h>

#include<math.h>

void main()

{
    int a,b,c;

    printf("Enter a integer:\n");

    scanf("%d",&a);

    printf("Enter the power!:\n");

    scanf("%d",&b);

    c=pow(a,b);

    printf("The result of %d^%d is : %d",a,b,c);

    getch();

}

Output:


Comments

Popular posts from this blog

TOP 10 PROGRAMMING LANGAUAGES COMMING 2021 | ARTICLE

Write a C-program to swap two number:

Print Fibonacci Series using Recursion | C program :