#include
#include
void main()
{
int count, n;
float x,y;
printf(“Enter the values of x and n:”);
scanf(“%f%d”, &x,&n);
y=1.0;
count=1;
while(count<=n)
{
y=y*x;
count++;
}
printf(“x=%f; n=%d; x to power n=%f”, x, n,y);
}
Output: Enter the values of x and n: 2.5 4 X=2.500000; n=4; x to power n= 39.062500