## Write a C C++ program to find power of given number

Looping और iterative statements के बारे में और अधिक जानने के लिए देखें— Looping statements in C

C Language की विशेषताओं एवं शक्तियों को जानने के लिए देखें—Features and Powers of C

### Flowchart to find power of given number

### C program to find power of given number

```
#include<stdio.h>
int main()
{
int num,pow,c=1,res=1;
printf("Enter number: ");
scanf("%d",&num);
printf("Enter power : ");
scanf("%d",&pow);
while(c<=pow)
{
res=res*num;
c++;
}
printf("Result = %d",res);
return 0;
}
```

### C++ program to find power of given number

```
#include<iostream>
using namespace std;
int main()
{
int num,pow,c=1,res=1;
cout<<"Enter number: ";
cin>>num;
cout<<"Enter power : ";
cin>>pow;
while(c<=pow)
{
res=res*num;
c++;
}
cout<<"Result = "<<res;
return 0;
}
```

### Output of C C++ program to find power of given number

Enter number: 5 Enter power : 3 Result = 125

Enter number: 3 Enter power : 4 Result = 81

Enter number: 2 Enter power : 5 Result = 32

### Similar programs in C C++

- Generate series of natural numbers (while, for, do while)
- Generate series of natural numbers and their sum
- Generate series of odd numbers and find their sum
- Generate series of even numbers and find their sum
- Generate table of given number
- Find factorial of given number
- Generate multiplication table of given number
- HCF and LCM of two numbers
- Generating Fibonacci series
- Checking prime number
- Generating series of prime numbers
- Sum of digits of given number
- Reverse of digits of given number
- Checking palindrome number
- Checking Armstrong number
- Generating series of Armstrong numbers
- Convert decimal to binary
- Convert binary to decimal