void main() { int i,j; int count; for(i=2;i<100000;i++) { count=0; for(j=2;j<=sqrt(i);j++) { if(i%j==0) ++count; } if(count==0) printf("%d\n",i); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)