66. C Program To find m Power of n Given Number.
How does this program work?
- This Program is used to find m power of n number.
- when ever The M and N values are given.
Here is the code
#include <stdio.h>
int main(void)
{
//To find m power of n
int i=1, m, n, ans=1;
printf("Enter m and power n \n");
scanf("%d \n %d", &m, &n);
while (i<=n)
{
ans = ans*m;
i = i+1;
}
printf("%d to the power %d is %d", m, n, ans);
return 0;
}