fork download
  1. #include<stdio.h>
  2. int main(void){
  3.  
  4. int x,i;
  5. // x:dividend i:divisor
  6. printf("2\n");
  7. for (x=3;x<1000000;x+=2){
  8. for(i=3;i*i<=x&&x%i!=0; i+=2)
  9. ;
  10. /* if(i*i>x)
  11.   printf("%d\n",x);*/
  12. }
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0.69s 1788KB
stdin
Standard input is empty
stdout
2