fork download
  1. #include <stdio.h>
  2. main()
  3. {
  4. int i, j = 0, n;
  5. scanf("%d", &n);
  6. for(i = 2; (i * i <= n) && (j = 0); i++)
  7. if(n % i = 0){
  8. j = 1;
  9. }
  10. printf("%d\n", j);
  11. return 0;
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
99
compilation info
prog.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
 main()
 ^~~~
prog.c: In function ‘main’:
prog.c:7:12: error: lvalue required as left operand of assignment
   if(n % i = 0){
            ^
stdout
Standard output is empty