int i,n; scanf("%d",&n); i=2; //这一步是亮点!! while(i<n) { if(n%i==0) break; i++; } if(i==n) printf("这是素数"); 相关文章: