标签:char get getch int print while scanf code blog
int main() { int a; int arr[10]={0}; printf("请输入一个数:"); scanf("%d",&a); while(a!=1&&a!=145) { printf("现在的数是%d->",a); int i = 0; while(a > 0) { arr[i++] = a % 10; a /= 10; } i--; while(i>=0) { printf("%d*%d",arr[i],arr[i]); if(i>0) printf("+"); a = a + arr[i]*arr[i]; i--; } printf("=%d\n",a); } getchar(); return 0; }
标签:char get getch int print while scanf code blog
原文地址:http://www.cnblogs.com/wumac/p/6123199.html