fork download
  1. #include <stdio.h>
  2. main()
  3. {
  4. int i,j=0;
  5. int n;
  6. scanf("%d",&n);
  7. for(i=2; ((i*i)<=n)&&(j==0) ; i++)//設立
  8. if((n%i)==0)
  9. {
  10. j=1;
  11. }
  12. printf("%d\n",j);
  13. }
Success #stdin #stdout 0s 16064KB
stdin
100
stdout
1