Computer Science, asked by maharanvarganesh, 17 days ago

Write a program which calculates (X)Y by using inbuilt function.

Answers

Answered by philipselumali
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