#include "stdio.h" main() {int x,n,i; long s=1; printf("please input x and n:"); scanf("%d%d",&x,&n); for(i=1;i<=n;i++) s*=x; printf("%d^%d=%d",x,n,s); }一个数的任意次方