//参考下~~#include main() { int x,i,k; printf("请输入:\n"); while(scanf("%d",&x)) { printf("分解质因数:\n"); k=x; for(i=2;i if(x%i==0) { printf("%d ",i); x=x/i--; if(x==0) break; } printf("\n"); printf("请输入:\n"); } }