确实是for....while...不太合适,而且我对于n的来回赋值也没有看太懂。自己写了一个供批评参考#include<stdio.h>#include<math.h>void main(){int i,n,m; printf("Iput a number:\n"); scanf("%d",&n); printf("The results are:\n");for(i=n;i>=sqrt(n);i--){if(n%i==0){printf("%d=",n);m=i;printf("%d*",m);m=n/m;printf("%d\n",m);}}}