criyle/codenet-compile-errors huggingface dataset:
Language: C

#include <stdio.h>

int main(){

int n[10000],count[10000],k,s,i,j;
double f[10000],z[10000];

for(i=0;i<10000;i++){
 count[i] = 0;
}

k=0;

scanf("%d\n",&s);

for(i=0;i<s;i++){
 scanf("%d\n",&n[i]);
　f[i]=sqrt(n[i]);
  z[i]=f[i]-f[i]%1
  for(j=1;j<=z[i];j++){
   if(n[i]%j == 0){
    count[i] = count[i]+1;
    }
   if(count[i]==3){
    break;
    }   
   }
 if(count[i]==2){
  k=k+1;
   }
}

printf("%d\n",k);

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:18:1: error: stray '\343' in program
   18 | <U+3000>f[i]=sqrt(n[i]);
      | ^~~~~~~~
main.c:18:8: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   18 | 　f[i]=sqrt(n[i]);
      |        ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:18:8: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   18 | 　f[i]=sqrt(n[i]);
      |        ^~~~
main.c:18:8: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:19:17: error: invalid operands to binary % (have 'double' and 'int')
   19 |   z[i]=f[i]-f[i]%1
      |             ~~~~^
      |              |
      |              double
main.c:19:19: error: expected ';' before 'for'
   19 |   z[i]=f[i]-f[i]%1
      |                   ^
      |                   ;
   20 |   for(j=1;j<=z[i];j++){
      |   ~~~
Language: C

#include <stdio.h>

int main(){

double n[10000],count[10000],s,i,j;
double f[10000],z[10000];
int k;

for(i=0;i<10000;i++){
 count[i] = 0;
}

k=0;

scanf("%d\n",&s);

for(i=0;i<s;i++){
 scanf("%.lf\n",&n[i]);
　f[i]=sqrt(n[i]);
  z[i]=f[i]-f[i]%1
  for(j=1;j<=z[i];j++){
   if(n[i]%j == 0){
    count[i] = count[i]+1;
    }
   if(count[i]==3){
    break;
    }   
   }
 if(count[i]==2){
  k=k+1;
   }
}

printf("%d\n",k);

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:10:7: error: array subscript is not an integer
   10 |  count[i] = 0;
      |       ^
main.c:18:19: error: array subscript is not an integer
   18 |  scanf("%.lf\n",&n[i]);
      |                   ^
main.c:19:1: error: stray '\343' in program
   19 | <U+3000>f[i]=sqrt(n[i]);
      | ^~~~~~~~
main.c:19:4: error: array subscript is not an integer
   19 | 　f[i]=sqrt(n[i]);
      |    ^
main.c:19:8: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   19 | 　f[i]=sqrt(n[i]);
      |        ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:19:8: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   19 | 　f[i]=sqrt(n[i]);
      |        ^~~~
main.c:19:8: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:19:14: error: array subscript is not an integer
   19 | 　f[i]=sqrt(n[i]);
      |              ^
main.c:20:4: error: array subscript is not an integer
   20 |   z[i]=f[i]-f[i]%1
      |    ^
main.c:20:9: error: array subscript is not an integer
   20 |   z[i]=f[i]-f[i]%1
      |         ^
main.c:20:14: error: array subscript is not an integer
   20 |   z[i]=f[i]-f[i]%1
      |              ^
main.c:20:19: error: expected ';' before 'for'
   20 |   z[i]=f[i]-f[i]%1
      |                   ^
      |                   ;
   21 |   for(j=1;j<=z[i];j++){
      |   ~~~
Language: C

#include <stdio.h>

int main(){

double n[10000],count[10000],s,i,j;
double f[10000],z[10000];
int k;

for(i=0;i<10000;i++){
 count[i] = 0;
}

k=0;

scanf("%.lf\n",&s);

for(i=0;i<s;i++){
 scanf("%.lf\n",&n[i]);
　f[i]=sqrt(n[i]);
  z[i]=f[i]-f[i]%1
  for(j=1;j<=z[i];j++){
   if(n[i]%j == 0){
    count[i] = count[i]+1;
    }
   if(count[i]==3){
    break;
    }   
   }
 if(count[i]==2){
  k=k+1;
   }
}

printf("%d\n",k);

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:10:7: error: array subscript is not an integer
   10 |  count[i] = 0;
      |       ^
main.c:18:19: error: array subscript is not an integer
   18 |  scanf("%.lf\n",&n[i]);
      |                   ^
main.c:19:1: error: stray '\343' in program
   19 | <U+3000>f[i]=sqrt(n[i]);
      | ^~~~~~~~
main.c:19:4: error: array subscript is not an integer
   19 | 　f[i]=sqrt(n[i]);
      |    ^
main.c:19:8: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   19 | 　f[i]=sqrt(n[i]);
      |        ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:19:8: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   19 | 　f[i]=sqrt(n[i]);
      |        ^~~~
main.c:19:8: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:19:14: error: array subscript is not an integer
   19 | 　f[i]=sqrt(n[i]);
      |              ^
main.c:20:4: error: array subscript is not an integer
   20 |   z[i]=f[i]-f[i]%1
      |    ^
main.c:20:9: error: array subscript is not an integer
   20 |   z[i]=f[i]-f[i]%1
      |         ^
main.c:20:14: error: array subscript is not an integer
   20 |   z[i]=f[i]-f[i]%1
      |              ^
main.c:20:19: error: expected ';' before 'for'
   20 |   z[i]=f[i]-f[i]%1
      |                   ^
      |                   ;
   21 |   for(j=1;j<=z[i];j++){
      |   ~~~
Language: C

#include <stdio.h>

int main(){

double n[10000],count[10000],s,i,j;
double f[10000],z[10000];
int k;

for(i=0;i<10000;i++){
 count[i] = 0;
}

k=0;

scanf("%.lf\n",&s);

for(i=0;i<s;i++){
 scanf("%.lf\n",&n[i]);
　f[i]=sqrt(n[i]);
  z[i]=f[i]-f[i]%1;
  for(j=1;j<=z[i];j++){
   if(n[i]%j == 0){
    count[i] = count[i]+1;
    }
   if(count[i]==3){
    break;
    }   
   }
 if(count[i]==2){
  k=k+1;
   }
}

printf("%d\n",k);

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:10:7: error: array subscript is not an integer
   10 |  count[i] = 0;
      |       ^
main.c:18:19: error: array subscript is not an integer
   18 |  scanf("%.lf\n",&n[i]);
      |                   ^
main.c:19:1: error: stray '\343' in program
   19 | <U+3000>f[i]=sqrt(n[i]);
      | ^~~~~~~~
main.c:19:4: error: array subscript is not an integer
   19 | 　f[i]=sqrt(n[i]);
      |    ^
main.c:19:8: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   19 | 　f[i]=sqrt(n[i]);
      |        ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:19:8: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   19 | 　f[i]=sqrt(n[i]);
      |        ^~~~
main.c:19:8: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:19:14: error: array subscript is not an integer
   19 | 　f[i]=sqrt(n[i]);
      |              ^
main.c:20:4: error: array subscript is not an integer
   20 |   z[i]=f[i]-f[i]%1;
      |    ^
main.c:20:9: error: array subscript is not an integer
   20 |   z[i]=f[i]-f[i]%1;
      |         ^
main.c:20:14: error: array subscript is not an integer
   20 |   z[i]=f[i]-f[i]%1;
      |              ^
main.c:21:15: error: array subscript is not an integer
   21 |   for(j=1;j<=z[i];j++){
      |               ^
main.c:22:8: error: array subscript is not an integer
   22 |    if(n[i]%j == 0){
      |        ^
main.c:23:10: error: array subscript is not an integer
   23 |     count[i] = count[i]+1;
      |          ^
main.c:23:21: error: array subscript is not an integer
   23 |     count[i] = count[i]+1;
      |                     ^
main.c:25:12: error: array subscript is not an integer
   25 |    if(count[i]==3){
      |            ^
main.c:29:10: error: array subscript is not an integer
   29 |  if(count[i]==2){
      |          ^
Language: C

#include <stdio.h>

int main(){

double n[10000],count[10000];
double f[10000],z[10000];
int k,s,i,j;

for(i=0;i<10000;i++){
 count[i] = 0;
}

k=0;

scanf("%.lf\n",&s);

for(i=0;i<s;i++){
 scanf("%.lf\n",&n[i]);
　f[i]=sqrt(n[i]);
  z[i]=f[i]-f[i]%1;
  for(j=1;j<=z[i];j++){
   if(n[i]%j == 0){
    count[i] = count[i]+1;
    }
   if(count[i]==3){
    break;
    }   
   }
 if(count[i]==2){
  k=k+1;
   }
}

printf("%d\n",k);

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:19:1: error: stray '\343' in program
   19 | <U+3000>f[i]=sqrt(n[i]);
      | ^~~~~~~~
main.c:19:8: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   19 | 　f[i]=sqrt(n[i]);
      |        ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:19:8: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   19 | 　f[i]=sqrt(n[i]);
      |        ^~~~
main.c:19:8: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:20:17: error: invalid operands to binary % (have 'double' and 'int')
   20 |   z[i]=f[i]-f[i]%1;
      |             ~~~~^
      |              |
      |              double
main.c:22:11: error: invalid operands to binary % (have 'double' and 'int')
   22 |    if(n[i]%j == 0){
      |       ~~~~^
      |        |
      |        double
Language: C

#include <stdio.h>

int main(){

int n[10000],count[10000];
int k,s,i,j;

for(i=0;i<10000;i++){
 count[i] = 0;
}

k=0;

scanf("%.lf\n",&s);

for(i=0;i<s;i++){
 scanf("%.lf\n",&n[i]);
  for(j=1;j<=sqrt(n[i]);;j++){
   if(n[i]%j == 0){
    count[i] = count[i]+1;
    }
   if(count[i]==3){
    break;
    }   
   }
 if(count[i]==2){
  k=k+1;
   }
}

printf("%d\n",k);

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:18:14: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   18 |   for(j=1;j<=sqrt(n[i]);;j++){
      |              ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:18:14: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   18 |   for(j=1;j<=sqrt(n[i]);;j++){
      |              ^~~~
main.c:18:14: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:18:25: error: expected expression before ';' token
   18 |   for(j=1;j<=sqrt(n[i]);;j++){
      |                         ^
Language: C

#include <stdio.h>

int main(){

int n[10000],count[10000];
int k,s,i,j;

for(i=0;i<10000;i++){
 count[i] = 0;
}

k=0;

scanf("%d\n",&s);

for(i=0;i<s;i++){
 scanf("%d\n",&n[i]);
  for(j=1;j<=sqrt(n[i]);;j++){
   if(n[i]%j == 0){
    count[i] = count[i]+1;
    }
   if(count[i]==3){
    break;
    }   
   }
 if(count[i]==2){
  k=k+1;
   }
}

printf("%d\n",k);

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:18:14: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   18 |   for(j=1;j<=sqrt(n[i]);;j++){
      |              ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:18:14: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   18 |   for(j=1;j<=sqrt(n[i]);;j++){
      |              ^~~~
main.c:18:14: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:18:25: error: expected expression before ';' token
   18 |   for(j=1;j<=sqrt(n[i]);;j++){
      |                         ^
Language: C

#include<stdio.h>
#include<math.h>

int main(void){
  int n,b,j,cnt=0;

  scanf("%d",&n);
  int x[10000];
  for(j=0;j<n;j++)
  scanf("%d",&x[j]);
  
  for(j=0;j<n;j++){
      if(x[j]==2)
         cnt=cnt+1;
         
      if(x[j]<2)
         j++;
         
      if(x[j]%2==0)
         j++;

          
     for(i=1;i<x[j];i=i+2){
        if(x[j]%j==0)
           j++;
           
       
        cnt=cnt+1;
    }
}
  printf("%d\n",cnt);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:23:10: error: 'i' undeclared (first use in this function)
   23 |      for(i=1;i<x[j];i=i+2){
      |          ^
main.c:23:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){

int a[10000],b[10000],i,k,n,true,false,ans;
scanf("%d",&n);

for(k=0;k<n;k++){
scanf("%d",&a[k]);

if(a[k]==2)
 true++;
else if((a[k]<2)||(a[k]%2==0))
 false++;
else{
 i=3;
while(i<=sqrt(a[k]){
if(a[k]%i==0)
     break;
    else 
 b[i]++;
 i=i+2;
}
if(b[i]==sqrt(a[i])-2)
true++;
}

}

printf("%d\n",true);
}



Compiler output:
main.c: In function 'main':
main.c:17:10: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   17 | while(i<=sqrt(a[k]){
      |          ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include<stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:17:10: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   17 | while(i<=sqrt(a[k]){
      |          ^~~~
main.c:17:10: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:17:20: error: expected ')' before '{' token
   17 | while(i<=sqrt(a[k]){
      |      ~             ^
      |                    )
main.c:26:1: error: expected expression before '}' token
   26 | }
      | ^
Language: C

#include<stdio.h>

int main(void){

int a[10000],b[10000],i,k,n,true,false;
scanf("%d",&n);

for(k=0;k<n;k++){
scanf("%d",&a[k]);

if(a[k]==2)
 true++;
else if((a[k]<2)||(a[k]%2==0))
 false++;
else{
 i=3;
while(i<=sqrt(a[k]){
if(a[k]%i==0)
     break;
    else 
 b[i]++;
 i=i+2;
}
if(b[i]==sqrt(a[i])-2)
true++;
}

}

printf("%d\n",true);
}



Compiler output:
main.c: In function 'main':
main.c:17:10: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   17 | while(i<=sqrt(a[k]){
      |          ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include<stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:17:10: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   17 | while(i<=sqrt(a[k]){
      |          ^~~~
main.c:17:10: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:17:20: error: expected ')' before '{' token
   17 | while(i<=sqrt(a[k]){
      |      ~             ^
      |                    )
main.c:26:1: error: expected expression before '}' token
   26 | }
      | ^
Language: C

#include<stdio.h>

int main(void){

int a[10000],n,i,k,q;
scanf("%d",&n);

for(k=0;k<n;k++){
scanf("%d",&a[k]);
}

for(k=0;k<n;k++){
q=q+prime(a[k]);
}

printf("%d\n",q)
}

int prime(a[k]){
if(a[k]==2)
 return 1;
else if((a[k]<2)||(a[k]%2==0))
 return 0;
else{
 i=3;
while(i<=sqrt(a[k])){
if(a[k]%i==0)
 return 0;
 i=i+2;
}
return 1;
}
}



Compiler output:
main.c: In function 'main':
main.c:13:5: error: implicit declaration of function 'prime' [-Wimplicit-function-declaration]
   13 | q=q+prime(a[k]);
      |     ^~~~~
main.c:16:17: error: expected ';' before '}' token
   16 | printf("%d\n",q)
      |                 ^
      |                 ;
   17 | }
      | ~                
main.c: At top level:
main.c:19:11: error: unknown type name 'a'
   19 | int prime(a[k]){
      |           ^
Language: C

#include<stdio.h>

int main(void){

int a[10000],n,i,k,q;
scanf("%d",&n);

for(k=0;k<n;k++){
scanf("%d",&a[k]);
}

for(k=0;k<n;k++){
q=q+prime(a[k]);
}

printf("%d\n",q)
}

int prime(k){
int k,i;

if(k==2)
 return 1;
else if((k<2)||k%2==0))
 return 0;
else{
 i=3;
while(i<=sqrt(k)){
if(k%i==0)
 return 0;
 i=i+2;
}
return 1;
}
}



Compiler output:
main.c: In function 'main':
main.c:13:5: error: implicit declaration of function 'prime' [-Wimplicit-function-declaration]
   13 | q=q+prime(a[k]);
      |     ^~~~~
main.c:16:17: error: expected ';' before '}' token
   16 | printf("%d\n",q)
      |                 ^
      |                 ;
   17 | }
      | ~                
main.c: In function 'prime':
main.c:19:5: error: type of 'k' defaults to 'int' [-Wimplicit-int]
   19 | int prime(k){
      |     ^~~~~
main.c:20:5: error: 'k' redeclared as different kind of symbol
   20 | int k,i;
      |     ^
main.c:19:5: note: previous definition of 'k' with type 'int'
   19 | int prime(k){
      |     ^~~~~
main.c:24:23: error: expected statement before ')' token
   24 | else if((k<2)||k%2==0))
      |                       ^
main.c:26:1: error: 'else' without a previous 'if'
   26 | else{
      | ^~~~
main.c:28:10: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   28 | while(i<=sqrt(k)){
      |          ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include<stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:28:10: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   28 | while(i<=sqrt(k)){
      |          ^~~~
main.c:28:10: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C

#include<stdio.h>

int prime(k){
int k,i;

if(k==2)
 return 1;
else if((k<2)||k%2==0))
 return 0;
else{
 i=3;
while(i<=sqrt(k)){
if(k%i==0)
 return 0;
 i=i+2;
}
return 1;
}
}

int main(void){

int a[10000],n,i,k,q;
scanf("%d",&n);

for(k=0;k<n;k++){
scanf("%d",&a[k]);
}

for(k=0;k<n;k++){
q=q+prime(a[k]);
}

printf("%d\n",q);
}



Compiler output:
main.c: In function 'prime':
main.c:3:5: error: type of 'k' defaults to 'int' [-Wimplicit-int]
    3 | int prime(k){
      |     ^~~~~
main.c:4:5: error: 'k' redeclared as different kind of symbol
    4 | int k,i;
      |     ^
main.c:3:5: note: previous definition of 'k' with type 'int'
    3 | int prime(k){
      |     ^~~~~
main.c:8:23: error: expected statement before ')' token
    8 | else if((k<2)||k%2==0))
      |                       ^
main.c:10:1: error: 'else' without a previous 'if'
   10 | else{
      | ^~~~
main.c:12:10: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   12 | while(i<=sqrt(k)){
      |          ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include<stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:12:10: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   12 | while(i<=sqrt(k)){
      |          ^~~~
main.c:12:10: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C

#include<stdio.h>

int prime(int x){
int i;

if(x==2)
 return 1;
else if((x<2)||x%2==0))
 return 0;
else{
 i=3;
while(i<=sqrt(x)){
if(x%i==0)
 return 0;
 i=i+2;
}
return 1;
}
}

int main(void){

int a[10000],n,i,k,q;
scanf("%d",&n);

for(k=0;k<n;k++){
scanf("%d",&a[k]);
}

for(k=0;k<n;k++){
q=q+prime(a[k]);
}

printf("%d\n",q);
}




Compiler output:
main.c: In function 'prime':
main.c:8:23: error: expected statement before ')' token
    8 | else if((x<2)||x%2==0))
      |                       ^
main.c:10:1: error: 'else' without a previous 'if'
   10 | else{
      | ^~~~
main.c:12:10: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   12 | while(i<=sqrt(x)){
      |          ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include<stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:12:10: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   12 | while(i<=sqrt(x)){
      |          ^~~~
main.c:12:10: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C

#include<stdio.h>

int prime(int x){
int x,i;

if(x==2)
 return 1;
else if((x<2)||(x%2==0))
 return 0;
else{
 i=3;
while(i<=sqrt(x)){
if(x%i==0)
 return 0;
 i=i+2;
}
return 1;
}
}

int main(void){

int a[10000],n,i,k,q;
scanf("%d",&n);

for(k=0;k<n;k++){
scanf("%d",&a[k]);
}

for(k=0;k<n;k++){
q=q+prime(a[k]);
}

printf("%d\n",q);
}




Compiler output:
main.c: In function 'prime':
main.c:4:5: error: 'x' redeclared as different kind of symbol
    4 | int x,i;
      |     ^
main.c:3:15: note: previous definition of 'x' with type 'int'
    3 | int prime(int x){
      |           ~~~~^
main.c:12:10: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   12 | while(i<=sqrt(x)){
      |          ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include<stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:12:10: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   12 | while(i<=sqrt(x)){
      |          ^~~~
main.c:12:10: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C

#include <stdio.h>

int main(){

int n[10000],count[10000];
int k,s,i,j;
double e[10000]

for(i=0;i<10000;i++){
 count[i] = 0;
}


k=0;

scanf("%d\n",&s);

for(i=0;i<s;i++){
 scanf("%d\n",&n[i]);
  
}

for(i=0;i<s;i++){

 e[i]=sqrt(n[i]);
for(j=1;j<=e[i];j++){
   if(n[i]%j == 0){
    count[i] = count[i]+1;
    }
   if(count[i]==3){
    break;
    }   
   }
 if(count[i]==2){
  k=k+1;
   }
}

printf("%d\n",k);

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:9:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
    9 | for(i=0;i<10000;i++){
      | ^~~
main.c:25:2: error: 'e' undeclared (first use in this function)
   25 |  e[i]=sqrt(n[i]);
      |  ^
main.c:25:2: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:7: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   25 |  e[i]=sqrt(n[i]);
      |       ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:25:7: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   25 |  e[i]=sqrt(n[i]);
      |       ^~~~
main.c:25:7: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C

#include <stdio.h>

int main(){

int n[10000],count[10000];
int k,s,i,j;
double e[10000];

for(i=0;i<10000;i++){
 count[i] = 0;
}

k=0;

scanf("%d\n",&s);

for(i=0;i<s;i++){
 scanf("%d\n",&n[i]);
  
}

for(i=0;i<s;i++){
 if(n[i] == 1){
   k++;
   }
 else if(n[i]%2 !==0 ){
    for(j=3;r!==0 && j<=sqrt(n[i]);j=j+2){
       r = n[i]%j;
       }
    if(r !== 0){
     k++;
    }
   }
}

printf("%d\n",k);

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:26:19: error: expected expression before '=' token
   26 |  else if(n[i]%2 !==0 ){
      |                   ^
main.c:27:13: error: 'r' undeclared (first use in this function)
   27 |     for(j=3;r!==0 && j<=sqrt(n[i]);j=j+2){
      |             ^
main.c:27:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:30:12: error: expected expression before '=' token
   30 |     if(r !== 0){
      |            ^
Language: C

#include <stdio.h>

int main(){

int n[10000];
int k,s,i,j,r;


k=0;

scanf("%d\n",&s);

for(i=0;i<s;i++){
 scanf("%d\n",&n[i]);
  
}

for(i=0;i<s;i++){
 if(n[i] == 1){
   k++;
   }
 else if(n[i]%2 !==0 ){
    for(j=3;r!==0 && j<=sqrt(n[i]);j=j+2){
       r = n[i]%j;
       }
    if(r !== 0){
     k++;
    }
   }
}

printf("%d\n",k);

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:22:19: error: expected expression before '=' token
   22 |  else if(n[i]%2 !==0 ){
      |                   ^
main.c:26:12: error: expected expression before '=' token
   26 |     if(r !== 0){
      |            ^
Language: C

#include <stdio.h>

int main(){

int n[10000];
int k,s,i,j,r;


k=0;

scanf("%d\n",&s);

for(i=0;i<s;i++){
 scanf("%d\n",&n[i]);
  
}

for(i=0;i<s;i++){
 if(n[i] == 1){
   k++;
   }
 else if(n[i]%2 !=0 ){
    for(j=3;r!=0 && j<=sqrt(n[i]);j=j+2){
       r = n[i]%j;
       }
    if(r !== 0){
     k++;
    }
   }
}

printf("%d\n",k);

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:23:24: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   23 |     for(j=3;r!=0 && j<=sqrt(n[i]);j=j+2){
      |                        ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:23:24: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   23 |     for(j=3;r!=0 && j<=sqrt(n[i]);j=j+2){
      |                        ^~~~
main.c:23:24: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:26:12: error: expected expression before '=' token
   26 |     if(r !== 0){
      |            ^
Language: C

#include <stdio.h>

int sub(int x){
int i
 
if(x == 2) return 1;

else if(x < 2 || x % 2 == 0) return 2;

else{
i = 3;
while(i <= sqrt(x)){
 if(x % i == 0) return 2;
    i = i + 2;
    }
  }
  return 1;
}

int main(){

int n[10000],i,s,r,k;

scanf("%d\n",&s);

for(i=0;i<s;i++){
scanf("%d\n",n[i]);
}

for(i=0;i<s;i++){
r=sub(n[i]);
if(r==1){
k++;
}
}

printf("%d\n",k);

return 0;
}


Compiler output:
main.c: In function 'sub':
main.c:6:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'if'
    6 | if(x == 2) return 1;
      | ^~
main.c:11:1: error: 'i' undeclared (first use in this function)
   11 | i = 3;
      | ^
main.c:11:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:12: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   12 | while(i <= sqrt(x)){
      |            ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:12:12: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   12 | while(i <= sqrt(x)){
      |            ^~~~
main.c:12:12: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C

#include <stdio.h>

int main(void){

    int l, n, i, j, count = 0;

    scanf("%d", &l); 

    for(i = 1; i <= l; i++){

        scanf("%d", &n); 

        if (n ==2 || n == 3 || n = 5){
            count++;
        }else if(n != 1 && n%2 != 0){
            for (j = 3; j <= n/2; j+=2) {
                if(n%j == 0){
                    break;
                }
                if(j == n/2-1 || j == n/2){
                    count++;
                    break;
                }
            }
        } 
    }

    printf("%d\n", count);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:34: error: lvalue required as left operand of assignment
   13 |         if (n ==2 || n == 3 || n = 5){
      |                                  ^
Language: C

#include <stdio.h>
#include <math.h>

int main(void){

    int l, n, i, j, count = 0;
    double x;

    scanf("%d", &l); 

    for(i = 1; i <= l; i++){

        scanf("%d", &n); 

        x = sqrt(n);

        if (n ==2 || n == 3 || n == 5){
            count++;
        }else if(n != 1 && n%2 != 0 && x*10%10 != 0){
            for (j = 3; j <= n/2; j=j+2) {
                if(n%j == 0){
                    break;
                }
                if(j == n/2-1 || j == n/2){
                    count++;
                    break;
                }
            }
        } 
    }

    printf("%d\n", count);
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:44: error: invalid operands to binary % (have 'double' and 'int')
   19 |         }else if(n != 1 && n%2 != 0 && x*10%10 != 0){
      |                                        ~~~~^
      |                                         |
      |                                         double
Language: C

#include<stdio.h>

int main() {

   int n, d, i, j;
   int c = 0;
   int x[10000], y[10000];

   scanf("%d", &n);

   for (i = 0; i <= n - 1; i++) {
      scanf("%d", &x[i]);
      for(d = 2; d <= x[i] - 1; d++) {
         if (x[i] != 2 && x[i] % 2 != 0 x[i] % d == 0) {
            c--;
            break;
         }
      }
      c++;
   }

   printf ("%d\n", c);

   return 0;
}



Compiler output:
main.c: In function 'main':
main.c:14:40: error: expected ')' before 'x'
   14 |          if (x[i] != 2 && x[i] % 2 != 0 x[i] % d == 0) {
      |             ~                          ^~
      |                                        )
Language: C

#include<stdio.h>
#include<math.h>

int main() {

   int n, d, i, j;
   int c = 0;
   float x;

   scanf("%d", &n);

   for (i = 0; i <= n - 1; i++) {
      scanf("%d", &x);
      for(d = 2; d <= sqrt(x); d++) {
         if (x != 2 && x % d == 0) {
            c--;
            break;
         }
      }
      c++;
   }

   printf ("%d\n", c);

   return 0;
}



Compiler output:
main.c: In function 'main':
main.c:15:26: error: invalid operands to binary % (have 'float' and 'int')
   15 |          if (x != 2 && x % d == 0) {
      |                          ^
Language: C

#include<stdio.h>
#include<math.h>

int main() {

   int n, d, i, j;
   int c = 0;
   double x;

   scanf("%d", &n);

   for (i = 0; i <= n - 1; i++) {
      scanf("%d", &x);
      for(d = 2; d <= sqrt(x); d++) {
         if (x != 2 && x % d == 0) {
            c--;
            break;
         }
      }
      c++;
   }

   printf ("%d\n", c);

   return 0;
}



Compiler output:
main.c: In function 'main':
main.c:15:26: error: invalid operands to binary % (have 'double' and 'int')
   15 |          if (x != 2 && x % d == 0) {
      |                          ^
Language: C

#include <stdio.h>


int prime(int num) {
    if (num < 2) return 0;
    else if (num == 2) return 1;
    else if (num % 2 == 0) return 0; // 偶数はあらかじめ除く

    int i;
    for (int i = 3; i * i < =num; i += 2) {
        if (num % i == 0)return 0;
    }
    return 1;
}

int main(){
    int n,i,p,count,j;
    count=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&p);
        j=prime(p);
        if(j==1) count++;
    }


    return 0;
}



Compiler output:
main.c: In function 'prime':
main.c:10:29: error: expected expression before '=' token
   10 |     for (int i = 3; i * i < =num; i += 2) {
      |                             ^
Language: C

#include <stdio.h>


int prime(int num) {
    if (num < 2) return 0;
    else if (num == 2) return 1;
    else if (num % 2 == 0) return 0; // 偶数はあらかじめ除く

    int i;
    for (int i = 3; i * i < =num; i += 2) {
        if (num % i == 0)return 0;
    }
    return 1;
}

int main(){
    int n,i,p,count,j;
    count=0;
    scanf("%d",&n);
    for(i=0;i<n;i++){
        scanf("%d",&p);
        j=prime(p);
        if(j==1) count++;
    }
    printf("%d",count);
    return 0;
}



Compiler output:
main.c: In function 'prime':
main.c:10:29: error: expected expression before '=' token
   10 |     for (int i = 3; i * i < =num; i += 2) {
      |                             ^
Language: C

#include <stdio.h>

int catch(long int x){
    int count = 0;
    int i;
    for(i = 1; i < x; i++){
        if(x % i == 0){
            ++count;
        }
    }
    if(count > 1){
        return 0;
    }else{
        return 1;
    }
}

int main(void){
    int n, i;
    long int x;
    int ans = 0;
    char order[100];
    
    fgets(order, 100, stdin);
    sscanf(order, "%d", &n);
    
    
    for(i = 0; i < n; i++){
        fgets(order, 100, stdin);
        sscanf(order, "%ld", &x);
        ans += catch(x);
    }
    printf("%d\n", ans);
    return


Compiler output:
main.c: In function 'main':
main.c:34:5: error: expected expression at end of input
   34 |     return
      |     ^~~~~~
main.c:34:5: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>

int main(void) {
	int N;
	int a[10000];
	int i, j=2;
	int cnt = 0;

	scanf_s("%d", &N);
	for (i = 0; i < N; i++) {
		scanf_s("%d", &a[i]);
	}

	for (i = 0; i < N; i++) {
		for (j = 2; j <= a[i]; j++) {
			if (j != a[i] && a[i] % j == 0) {
				cnt++;
				break;
			}
		}
	}
	
	printf("%d\n", N - cnt);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    9 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>

int judge(x) {
  double i = 3;
 
  if(x == 1) return 0;
  if(x%2 == 0 && x != 2)
    return 0;
  while(i <= x)) {
    if((int)x%(int)i == 0) return 0;
    i++;
  }
  return 1;
}

int main() {
  int n, i;
  int s = 0;
  int *A;

  scanf("%d", &n);
  A = malloc(n*sizeof(int));

  for(i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }

  for(i = 0; i < n; i++) {
    s += judge(A[i]);
  }

  printf("%d\n", s);

  return 0;
}

Compiler output:
main.c: In function 'judge':
main.c:5:5: error: type of 'x' defaults to 'int' [-Wimplicit-int]
    5 | int judge(x) {
      |     ^~~~~
main.c:11:16: error: expected statement before ')' token
   11 |   while(i <= x)) {
      |                ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>

int judge(x) {
  double i = 3;
 
  if(x == 1) return 0;
  if(x%2 == 0 && x != 2)
    return 0;
  while(i <= sqrt((double)x) {
    if((int)x%(int)i == 0) return 0;
    i++;
  }
  return 1;
}

int main() {
  int n, i;
  int s = 0;
  int *A;

  scanf("%d", &n);
  A = malloc(n*sizeof(int));

  for(i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }

  for(i = 0; i < n; i++) {
    s += judge(A[i]);
  }

  printf("%d\n", s);

  return 0;
}

Compiler output:
main.c: In function 'judge':
main.c:5:5: error: type of 'x' defaults to 'int' [-Wimplicit-int]
    5 | int judge(x) {
      |     ^~~~~
main.c:11:29: error: expected ')' before '{' token
   11 |   while(i <= sqrt((double)x) {
      |        ~                    ^~
      |                             )
main.c:16:1: error: expected expression before '}' token
   16 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>

int prime(int);

int main()
{
    int N,A[10001],i;
    scanf("%d"&N);
    for(i=0;i<=N-1;i++)
        {
            scanf("%d",&A[i]);
        }
    int m=0,all;
    for(i=0;i<=N-1;i++)
        {
            all+=prime(A[i]);
        }
    printf("%d\n",all);
    return 0;
}


int prime(int x)
{
    if(x%2==0) return 0;
    if(x==1) return 0;
    if(x==3) return 1;
    int i;
    for(i=5;i<=sqrt(x);i+=2)
        {
           if(x%i==0) return 0; 
        }
    return 1;
}

Compiler output:
main.c: In function 'main':
main.c:9:15: error: invalid operands to binary & (have 'char *' and 'int')
    9 |     scanf("%d"&N);
      |           ~~~~^
      |           |
      |           char *
Language: C

#include<stdio.h>
#include<math.h>

int prime(int);

int main()
{
    int N,A[10001],i;
    scanf("%d"&N);
    for(i=0;i<=N-1;i++)
        {
            scanf("%d",&A[i]);
        }
    int m=0,all;
    for(i=0;i<=N-1;i++)
        {
            all+=prime(A[i]);
        }
    printf("%d\n",all);
    return 0;
}


int prime(int x)
{
    if(x==2||x==3) return 1;
    if(x==1) return 0;
    if(x%2==0) return 0;
    int i;
    for(i=5;i<=sqrt(x);i+=2)
        {
           if(x%i==0) return 0; 
        }
    return 1;
}

Compiler output:
main.c: In function 'main':
main.c:9:15: error: invalid operands to binary & (have 'char *' and 'int')
    9 |     scanf("%d"&N);
      |           ~~~~^
      |           |
      |           char *
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int isPrime(int);

int main(){
  int i, n, *A;
  int primen=0;

  scanf("%d", &n);
  A = (int *)malloc(n*sizeof(int));

  for(i=0; i<n; i++) scanf("%d",A+i);

  for(i=0; i<n; i++){
    if (isPrime(A[i])==1) primen++;
  }
  printf("%d\n",primen);

  return 0;
}

int isPrime(int x){
  int i;

  if (x == 2) return 1;

  if (x<2 || x%2==0) return -1;

  i = 3;
  while (i <= sqrt(x)){
    if (x%i==0) return false;
    i = i + 2;
  }
  return true;
}

Compiler output:
main.c: In function 'isPrime':
main.c:32:24: error: 'false' undeclared (first use in this function)
   32 |     if (x%i==0) return false;
      |                        ^~~~~
main.c:4:1: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include <math.h>
  +++ |+#include <stdbool.h>
    4 | int isPrime(int);
main.c:32:24: note: each undeclared identifier is reported only once for each function it appears in
   32 |     if (x%i==0) return false;
      |                        ^~~~~
main.c:35:10: error: 'true' undeclared (first use in this function)
   35 |   return true;
      |          ^~~~
main.c:35:10: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include<stdio.h>

int isPrime(int x)
{
  int i;
  if(x <= 1)return 0;
  else if (x == 2)return 1;
  
  if(x % 2 == 0)return 0;
  
  for(i = 3 ; i*i <= x ;i += 2)
    {
      if(x % i == 0)return 0;
    }
  return 1;
}

int main()
{
  int x,i,n;
  int cnt = 0;
  scanf("%d", &n);
  for(i = 0 ; i < n ; i++)
    {
      scanf("%d", &x);
      if(isprime(x) )cnt++;
    }
  printf("%d\n", cnt);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:10: error: implicit declaration of function 'isprime'; did you mean 'isPrime'? [-Wimplicit-function-declaration]
   26 |       if(isprime(x) )cnt++;
      |          ^~~~~~~
      |          isPrime
Language: C

#include<stdio.h>
#include<math.h>
int hantei(int);
main(){
  int i,j,n,s,sum=0;
  int N[10000];
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&N[i]);
  for(i=0;i<n;i++)if(hantei(N[i])==0)sum++;  
  printf("%d\n",sum);
  return 0;
}

int hantei(int n){
  int i;
  if(n==2)return 0;
  if(n<2 || (n%2)==0)return 1;
  i=3;
  while(i<=sqrt(n))
    if((n%i)==0)return 1;
    i+2
  else return 0;
}
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'hantei':
main.c:21:8: error: expected ';' before 'else'
   21 |     i+2
      |        ^
      |        ;
   22 |   else return 0;
      |   ~~~~  
main.c: At top level:
main.c:24:1: error: expected identifier or '(' before '}' token
   24 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>
int hantei(int);
main(){
  int i,j,n,s,sum=0;
  int N[10000];
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&N[i]);
  for(i=0;i<n;i++)if(hantei(N[i])==0)sum++;  
  printf("%d\n",sum);
  return 0;
}

int hantei(int n){
  int i;
  if(n==2)return 0;
  if(n<2 || (n%2)==0)return 1;
  i=3;
  while(i<=sqrt(n))
    if((n%i)==0)return 1;
    i+2;
  else return 0;

}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'hantei':
main.c:22:3: error: 'else' without a previous 'if'
   22 |   else return 0;
      |   ^~~~
Language: C

#include<stdio.h>
#include<math.h>
int hantei(int);
main(){
  int i,j,sum=0;
  int N[10000];
  
  for(i=0;i<n;i++)scanf("%d",&N[i]);
  for(j=0;j<i;j++)if(hantei(N[j])==0)sum++;
}  
  printf("%d\n",sum);
  return 0;
}

int hantei(int n){
  int i;
  if(n==2)return 0;
  if(n<2 || (n%2)==0)return 1;
  i=3;
  while(i<=sqrt(n)){
    if((n%i)==0)return 1;
    i+2;}
   return 0;

}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'main':
main.c:8:13: error: 'n' undeclared (first use in this function)
    8 |   for(i=0;i<n;i++)scanf("%d",&N[i]);
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:11:10: error: expected declaration specifiers or '...' before string constant
   11 |   printf("%d\n",sum);
      |          ^~~~~~
main.c:11:17: error: unknown type name 'sum'
   11 |   printf("%d\n",sum);
      |                 ^~~
main.c:12:3: error: expected identifier or '(' before 'return'
   12 |   return 0;
      |   ^~~~~~
main.c:13:1: error: expected identifier or '(' before '}' token
   13 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>
int hantei(int);
main(){
  int i,j,sum=0;
  int N[10000];
  
  for(i=0;i<n;i++)scanf("%d",&N[i]);
  for(j=0;j<i;j++)if(hantei(N[j])==0)sum++;
  
  printf("%d\n",sum);
  return 0;
}

int hantei(int n){
  int i;
  if(n==2)return 0;
  if(n<2 || (n%2)==0)return 1;
  i=3;
  while(i<=sqrt(n)){
    if((n%i)==0)return 1;
    i+2;}
   return 0;

}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'main':
main.c:8:13: error: 'n' undeclared (first use in this function)
    8 |   for(i=0;i<n;i++)scanf("%d",&N[i]);
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<math.h>
int hantei(int);
main(){
  int i,j,sum=0;
  int N[10000];
  
  for(i=0;scanf("%d",&N[i]==1;i++);
  for(j=0;j<i;j++)if(hantei(N[j])==0)sum++;
  
  printf("%d\n",sum);
  return 0;
}

int hantei(int n){
  int i;
  if(n==2)return 0;
  if(n<2 || (n%2)==0)return 1;
  i=3;
  while(i<=sqrt(n)){
    if((n%i)==0)return 1;
    i+2;}
   return 0;

}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'main':
main.c:8:27: warning: comparison between pointer and integer
    8 |   for(i=0;scanf("%d",&N[i]==1;i++);
      |                           ^~
main.c:8:30: error: expected ')' before ';' token
    8 |   for(i=0;scanf("%d",&N[i]==1;i++);
      |                ~             ^
      |                              )
main.c:9:3: error: expected expression before 'for'
    9 |   for(j=0;j<i;j++)if(hantei(N[j])==0)sum++;
      |   ^~~
main.c:13:1: error: expected expression before '}' token
   13 | }
      | ^
Language: C

#include<stdio.h>
int isPrime(int);

int main(){
  int x[10000];
  int N,i,sosu,n=0;
  
  scanf("%d",&N);
  for(i = 0; i < N; i++){
    scanf("%d",&x[i]);
    sosu = isPrime(x[i]);
    if(sosu == 1){n++;}
  }
  printf("%d\n",n);
  return 0;
}

int isPrime( int x ){
  int i;
  if (x <= 1)return 0;
  if(x == 2)return 1;
  for (i = 2; x-1; i++){
    if (x % i == 0 )return 0;

Compiler output:
main.c: In function 'isPrime':
main.c:23:5: error: expected declaration or statement at end of input
   23 |     if (x % i == 0 )return 0;
      |     ^~
main.c:23:5: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
#include<math.h>
int hantei(int);
main(){
  int i,j,n,s,sum=0;
  int N[10000];
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&N[i]);
  for(i=0;i<n;i++)if(hantei(N[i]))sum++;  
  printf("%d\n",sum);
  return 0;
}

int hantei(int n){
  int i=3;
  if(n==2)return 1;
  if(n<2 || (n%2)==0)return 0;
  while(i<=sqrt(n)){
    if((n%i)==0)return 0;
    }
    i+2}
  else return 0;
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'hantei':
main.c:21:8: error: expected ';' before '}' token
   21 |     i+2}
      |        ^
      |        ;
main.c: At top level:
main.c:22:3: error: expected identifier or '(' before 'else'
   22 |   else return 0;
      |   ^~~~
main.c:23:1: error: expected identifier or '(' before '}' token
   23 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>
int hantei(int);
main(){
  int i,j,n,s,sum=0;
  int N[10000];
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&N[i]);
  for(i=0;i<n;i++)if(hantei(N[i]))sum++;  
  printf("%d\n",sum);
  return 0;
}

int hantei(int n){
  int i=3;
  if(n==2)return 1;
  if(n<2 || (n%2)==0)return 0;
  while(i<=sqrt(n)){
    if((n%i)==0)return 0;
    i+2}
  else return 0;
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'hantei':
main.c:20:8: error: expected ';' before '}' token
   20 |     i+2}
      |        ^
      |        ;
main.c:21:3: error: 'else' without a previous 'if'
   21 |   else return 0;
      |   ^~~~
Language: C

#include<stdio.h>
#include<math.h>
int hantei(int);
main(){
  int i,j,n,s,sum=0;
  int N[10000];
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&N[i]);
  for(i=0;i<n;i++)if(hantei(N[i]))sum++;  
  printf("%d\n",sum);
  return 0;
}

int hantei(int n){
  int i=3;
  if(n==2)return 1;
  if(n<2 || (n%2)==0)return 0;
  while(i<=sqrt(n)){
    if((n%i)==0)return 0;
    i+2
}
   return 0;
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'hantei':
main.c:20:8: error: expected ';' before '}' token
   20 |     i+2
      |        ^
      |        ;
   21 | }
      | ~
Language: C

#include<stdio.h>
#include<math.h>
int hantei(int);
main(){
  int i,j,n,sum=0;
  int N[10000];
  scanf("%d",&n);
  for(i=0;i<n;i++){ 
      scanf("%d",&N[i]);
      if(hantei(N[j]))sum++; 
} 
  printf("%d\n",sum);
  return 0;
}

int hantei(int n){
  int i=3;
  if(n==2)return 1;
  elseif(n<2 || (n%2)==0)return 0;
  else{
  while(i<=sqrt(n)){
    if((n%i)==0)return 0;
    i= i+2;
    }}
   return 1;
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'hantei':
main.c:19:3: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration]
   19 |   elseif(n<2 || (n%2)==0)return 0;
      |   ^~~~~~
main.c:19:26: error: expected ';' before 'return'
   19 |   elseif(n<2 || (n%2)==0)return 0;
      |                          ^~~~~~
      |                          ;
main.c:20:3: error: 'else' without a previous 'if'
   20 |   else{
      |   ^~~~
Language: C

#include<stdio.h>
#include<math.h>
int hantei(int);
main(){
  int i,j,n,sum=0;
  int N[10000];
  scanf("%d",&n);
  for(i=0;i<n;i++){ 
      scanf("%d",&N[i]);
      if(hantei(N[j]))sum++; 
} 
  printf("%d\,sum);
  return 0;
}

int hantei(int n){
  int i=3;
  if(n==2)return 1;
  else if(n<2 || (n%2)==0)return 0;
  else{
  while(i<=sqrt(n)){
    if((n%i)==0)return 0;
    i= i+2;
    }}
   return 1;
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main(){
      | ^~~~
main.c: In function 'main':
main.c:12:10: warning: missing terminating " character
   12 |   printf("%d\,sum);
      |          ^
main.c:12:10: error: missing terminating " character
   12 |   printf("%d\,sum);
      |          ^~~~~~~~~~
main.c:13:3: error: expected expression before 'return'
   13 |   return 0;
      |   ^~~~~~
main.c:13:12: error: expected ';' before '}' token
   13 |   return 0;
      |            ^
      |            ;
   14 | }
      | ~
Language: C

#include<stdio.h>
#include<math.h>

int sosudiagnosis(int);

int main()
{
  int n; //入力できる個数
  int s; //数
  int l=0; //ループの回数
  int count=0;//素数の数

  scanf("%d",&n);
  while(l < n){
    l++;
    scanf("%d",&s);

    if(sosudiagnosis(s)==1) count++;
  }
  printf("%d",count);
}

int sosudiagnosis(int s)
{
  int i=3;
  if(s == 2) return 1;

  if(s < 2 || s%2==0) return 0;

  while(i <= sqrt(s)){
    if(sosu%i==0) return 0;
  
    i = i + 2;
  }
  return 1;
}

Compiler output:
main.c: In function 'sosudiagnosis':
main.c:31:8: error: 'sosu' undeclared (first use in this function)
   31 |     if(sosu%i==0) return 0;
      |        ^~~~
main.c:31:8: note: each undeclared identifier is reported only once for each function it appears in