level 2
原因:因为last_3=z*100+y*10+x;所以每次运行for语句时,last_3的值是改变的,当下一次你输入n的值再次运行时,last_3不再是481,所以得出来的结果不正确。
表达能力有限,见谅。
程序:
#include <stdio.h>
int main()
{
int x,y,z,t,last_3,i,n;
last_3=481;
while(scanf("%d",&n)!=EOF)
{
last_3=481;
for(i=12; i<n; i++)
{
t=last_3*13;
x=t%10;
y=t/10%10;
z=t/100%10;
last_3=z*100+y*10+x;
}
printf("%d\n",last_3);
}
return 0;
}