fork(1) download
  1. #include <stdio.h>
  2.  
  3. int first(int n)
  4. {
  5. int i,j=0;
  6. for(i=1; i<=n; i++)
  7. {
  8. if(n%i == 0)
  9. j++;
  10. }
  11. if(j == 2)
  12. return 1;
  13. else if(j > 2)
  14. return 0;
  15. }
  16.  
  17.  
  18. int main(void) {
  19. // your code goes here
  20. printf("%d\n", first(3));
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
1