#include<stdio.h>
#include<math.h>
int
main()
{
int i,x,y,last=1; //变量last保存求X的Y次方过程中的部分积的后三位
printf("Input X and Y(X**Y):");
scanf("%d**%d",&x,&y);
for(i=1;i<=y;i++) //X自乘Y次
last=last*x00; //将last乘X后对1000取模,即求积的后三位
printf("The last 3 dights of %d**%d is :%d/n",x,y,last00);//%运算符的意义为取余
return 0; //用00运算式取数值的后三位
}
/*
output:
-----------------------------------------------------------------------
Input X and Y(X**Y):13**20
The last 3 dights of 13**20 is :801
Process returned 0 (0x0) execution time : 4.641 s
Press any key to continue.
-----------------------------------------------------------------------
*/