SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
C program to calculate x power y
C program to calculate x power y
Output:
Enter the number x: 5
Enter the number y: 5
result of 5 power 5 is 3125
Implementation:
/* If you want to find pow(x,y) or x raised to the power of y visit the link: http://www.coderegister.co.in/2015/09/c-program-to-find-nth-power-of-number.html Else if you want to find the ex-or product of x and y go on reading the following article */ #include
#include
#include
int main(void) { int x,y,result; printf("Enter the number x:\n"); scanf("%d",&x); printf("Enter the number y:\n"); scanf("%d",&y); result = pow(x,y); printf("result of %d power %d is %d",x,y,result); return 0; }
PREVIOUS
NEXT
HOME