Write a program which calculates (X)Y by using inbuilt function.
Answers
Answered by
0
Answer:
#include<stdio.h> #include<conio.h>
void main()
{
int x, y, i, r = 1, t
printf("Enter a number:"); scanf("%d",&x); printf("Enter the power:"); scanf("%d",&y); for(i=1;i<=y;i++)
{
t=x;
r=r*t;
}
printf("Result:%d",r);
getch();
}
Output:
Enter a number:5
Enter the power:3
Result:125
Similar questions
English,
8 days ago
Social Sciences,
17 days ago
Math,
9 months ago
English,
9 months ago
Math,
9 months ago