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

#include<stdio.h>

int main()
{
  int data[1000];
  int n, i, count;
  
  scanf("%d", &n);
  for (i = 0; i < n; i++){
    scanf("%d", &data[i]);
  }
  
  count = 0;
  for( i = 0; i < n; i++){
    for( j = 2; j < data[i]; j++){
      if ( data[i]%j == 0){
        break;
      } else if (j = data[i] - 1){
        count += 1;
      }
    }
  }
  printf("%d\n", count);
  return 0;
}

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

#include<stdio.h>

int main()
{
  int data[1000];
  int n, i, count;
  
  scanf("%d", &n);
  for (i = 0; i < n; i++){
    scanf("%d", &data[i]);
  }
  
  count = 0;
  for( i = 0; i < n; i++){
    for( j = 2; j < data[i]; j++){
      if ( data[i]%j == 0){
        break;
      } else if (j == data[i] - 1){
        count += 1;
      }
    }
  }
  printf("%d\n", count);
  return 0;
}

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

#include<stdio.h>

int main()
{
   int n, i, ans;
   scanf ("%d", &n);

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

   ans = n;

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

      while (1){
         if (R[i]%2>1){
            ans--;
             break;
         }
         else if (R[i]%3>1){
            ans--;
            break;
         }
         else if (R[i]%5>1){
            ans--;
            break;
         }
         else if (R[i]%7>1{
            ans--;
            break;
         }
      }

   }

   printf ("%d", ans);

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:30:27: error: expected ')' before '{' token
   30 |          else if (R[i]%7>1{
      |                  ~        ^
      |                           )
main.c:34:7: error: expected expression before '}' token
   34 |       }
      |       ^
Language: C

#include<stdio.h>

int main(){

  int n,i,j,a,count;

   scanf("%d",&n);

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

   count = 0;

     scanf("%d",&a);

    for(j = 2; j < a; j++){

  if(a % j == 0){

    break;
  
  }else

  sosuu = 1;


        }

    }

    if(sosuu = 1){
   
      printf("%d\n",count);

   }

     return 0;

 }

Compiler output:
main.c: In function 'main':
main.c:23:3: error: 'sosuu' undeclared (first use in this function)
   23 |   sosuu = 1;
      |   ^~~~~
main.c:23:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int hantei(int x){
  int i;
  if(x < 2)
    return 0;

  else if(x == 2)
    return 1;
  
  if(x % 2 == 0)
    return 0;

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

int main()
{
  int answer = 0;
  int n, x, i; 

  scanf("%d", &n);

  for(i = 0;i < n;i++){
    scanf("%d", &a);
    if( hantei(a) == 1 )answer++;
  }
  printf("%d\n",answer);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:29:18: error: 'a' undeclared (first use in this function)
   29 |     scanf("%d", &a);
      |                  ^
main.c:29:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void)
{

 int a, b, c, d;

 scanf("%d", &a);

 for(b=2;b<=a;b++){

 d=0;

 for(c=2;c<=b;c++){

 if(b%c==0 && b!=c){

 d++;

 break;

 }
}

 if(d==0);

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

 }
}
 return 0;

}

Compiler output:
main.c:31:2: error: expected identifier or '(' before 'return'
   31 |  return 0;
      |  ^~~~~~
main.c:33:1: error: expected identifier or '(' before '}' token
   33 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
 int n,m[10000],i,j,ans=0;

 scanf("%d",&n);

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

 for(i=0;i<n;i++){
 
  while(1){

   if(m[i]==2){
    ans++;
    break;
   }

   if(x<2||(x-1)%2) break;

   j=3;
   while(j<=sqrt(m[i])){
     if(m[i]%j==0){
       ans++;
       break;
     }
     j=j+2;
   }
  }
 }

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

 return 0;
}

 

Compiler output:
main.c: In function 'main':
main.c:22:7: error: 'x' undeclared (first use in this function)
   22 |    if(x<2||(x-1)%2) break;
      |       ^
main.c:22:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:13: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   25 |    while(j<=sqrt(m[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:13: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   25 |    while(j<=sqrt(m[i])){
      |             ^~~~
main.c:25:13: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C

#include <stdio.h>

int main(void)
{
 int n,m[10000],i,j,ans=0;

 scanf("%d",&n);

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

 for(i=0;i<n;i++){
 
  while(1){

   if(m[i]==2){
    ans++;
    break;
   }

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

   j=3;
   while(j<=sqrt(m[i])){
     if(m[i]%j==0){
       ans++;
       break;
     }
     j=j+2;
   }
  }
 }

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

 return 0;
}

 

Compiler output:
main.c: In function 'main':
main.c:22:8: error: 'x' undeclared (first use in this function)
   22 |    if( x<2 || (x-1)%2 == 0 ) break;
      |        ^
main.c:22:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:13: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   25 |    while(j<=sqrt(m[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:13: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   25 |    while(j<=sqrt(m[i])){
      |             ^~~~
main.c:25:13: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C

#include <stdio.h>

int main(void)
{
 int n,m[10000],i,j,ans=0;

 scanf("%d",&n);

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

 for(i=0;i<n;i++){
 
  while(1){

   if(m[i]==2){
    ans++;
    break;
   }

   if( x<2 || x%2 == 0 ) break;

   j=3;
   while(j<=sqrt(m[i])){
     if(m[i]%j==0){
       ans++;
       break;
     }
     j=j+2;
   }
  }
 }

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

 return 0;
}

 

Compiler output:
main.c: In function 'main':
main.c:22:8: error: 'x' undeclared (first use in this function)
   22 |    if( x<2 || x%2 == 0 ) break;
      |        ^
main.c:22:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:13: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   25 |    while(j<=sqrt(m[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:13: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   25 |    while(j<=sqrt(m[i])){
      |             ^~~~
main.c:25:13: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C

#include<stdio.h>

int prime(x)
{
   int i = 3;   /*1??\??????????°?????\???°*/

   if (x==2)
      return 1;   /*return 1??§2????´???°*/

   if(x<2 || x%2==0)
      return 0;   /*return 0??§x????´???°??§?????????*/

   while (i*i<=x){
      if (x%i==0){
         return 0;   /*i*i=x?????¨???x%i==0??§x????´???°??§?????????*/
      i = i+2;   /*i=3???+2????????????????\???°????¶????*/
   }

   return 1;
}


int main()
{
   int n, i, x;
   int ans = 0;

   scanf ("%d", &n);

   for (i=0; i<n; i++){
      scanf ("%d", &x);
      if (prime(x))
         ans++;
   }

   printf ("%d", ans);

   return 0;
}

Compiler output:
main.c: In function 'prime':
main.c:3:5: error: type of 'x' defaults to 'int' [-Wimplicit-int]
    3 | int prime(x)
      |     ^~~~~
main.c:39:1: error: expected declaration or statement at end of input
   39 | }
      | ^
Language: C

#include<stdio.h>

int prime(int x)
{
   int i = 3;   /*1??\??????????°?????\???°*/

   if (x==2)
      return 1;   /*return 1??§2????´???°*/

   if(x<2 || x%2==0)
      return 0;   /*return 0??§x????´???°??§?????????*/

   while (i*i<=x){
      if (x%i==0){
         return 0;   /*i*i=x?????¨???x%i==0??§x????´???°??§?????????*/
      i = i+2;   /*i=3???+2????????????????\???°????¶????*/
   }

   return 1;
}


int main()
{
   int n, i, x;
   int ans = 0;

   scanf ("%d", &n);

   for (i=0; i<n; i++){
      scanf ("%d", &x);
      if (prime(x))
         ans++;
   }

   printf ("%d", ans);

   return 0;
}

Compiler output:
main.c: In function 'prime':
main.c:39:1: error: expected declaration or statement at end of input
   39 | }
      | ^
Language: C

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

int main () {
   int n, i, j, count;
   int a[10000] = {0};

   scanf("%d", &n);

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

   
   count = n;


   for (i = 0; i < n; i++) {
      if (a[i] % 2 == 0){
         count--;
      }

      for (j = 3; j <= sqrt(a[i]); j+=2) {
         if (a[i] % j == 0) {
            count--;
            break;
         }
      }
   }


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

   return 0;
}


int 

Compiler output:
main.c: In function 'main':
main.c:23:24: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   23 |       for (j = 3; j <= sqrt(a[i]); j+=2) {
      |                        ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include<stdio.h>
  +++ |+#include <math.h>
    2 | #include<stdio.h>
main.c:23:24: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   23 |       for (j = 3; j <= sqrt(a[i]); j+=2) {
      |                        ^~~~
main.c:23:24: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c: At top level:
main.c:38:1: error: expected identifier or '(' at end of input
   38 | int
      | ^~~
Language: C

#include<stdio.h>

int prime(int);

int main()
{
   int n, i, x;
   int ans = 0;

   scanf ("%d", &n);

   for (i=0; i<n; i++){
      scanf ("%d", &x);
      if (prime(x))
         ans++;
   }

   printf ("%d", ans);

   return 0;
}


int prime(int x)
{
   int i = 3;   /*1????????§??????????°?????\???°*/

   if (x==2)
      return 1;   /*return 1??§2????´???°*/

   if(x<2 || x%2==0)
      return 0;   /*return 0??§x????´???°??§?????????*/

   while (i*i<=x){
      if (x%i==0){
         return 0;   /*i*i=x?????¨???x%i==0??§x????´???°??§?????????*/
      i = i+2;   /*i=3???+=2????????????????\???°????¶????*/
   }

   return 1;
}

Compiler output:
main.c: In function 'prime':
main.c:41:1: error: expected declaration or statement at end of input
   41 | }
      | ^
Language: C

#include<stdio.h>

int main(){

  int n, i, j;
  int count = 0;
  int v[n];
  scanf("%d", &n);

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

  for(i = 0; i<=n; i++){
    for(k = 2; k<=x; k++){
      if(v[j] % j == 0)
        count++;
    }
  } 

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:9: error: 'k' undeclared (first use in this function)
   15 |     for(k = 2; k<=x; k++){
      |         ^
main.c:15:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:19: error: 'x' undeclared (first use in this function)
   15 |     for(k = 2; k<=x; k++){
      |                   ^
Language: C

#include<stdio.h>

int main(){

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

  scanf("%d", &n);
  int v[n];

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

  for(i = 0; i<=n; i++){
    for(k = 2; k<=x; k++){
      if(v[j] % j == 0)
        count++;
    }
  } 

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:9: error: 'k' undeclared (first use in this function)
   16 |     for(k = 2; k<=x; k++){
      |         ^
main.c:16:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:19: error: 'x' undeclared (first use in this function)
   16 |     for(k = 2; k<=x; k++){
      |                   ^
Language: C

#include<stdio.h>

int main(){

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

  scanf("%d", &n);
  int v[n];

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

  for(i = 0; i<=n; i++){
    for(j = 0; j<=n; j++){
      for(k = 2; k<=x; k++){
        if(v[j] % j == 0)
          count++;
      }
    }
  } 

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:11: error: 'k' undeclared (first use in this function)
   17 |       for(k = 2; k<=x; k++){
      |           ^
main.c:17:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:21: error: 'x' undeclared (first use in this function)
   17 |       for(k = 2; k<=x; k++){
      |                     ^
Language: C

#include<stdio.h>

int main(){

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

  scanf("%d", &n);
  int v[n];

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

  for(i = 0; i<=n; i++){
    for(j = 0; j<=n; j++){
      for(k = 2; k<=x; k++){
        if(v[j] % k == 0)
          count++;
      }
    }
  } 

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:11: error: 'k' undeclared (first use in this function)
   17 |       for(k = 2; k<=x; k++){
      |           ^
main.c:17:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:21: error: 'x' undeclared (first use in this function)
   17 |       for(k = 2; k<=x; k++){
      |                     ^
Language: C

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

int main () {
   int n, i, j, count;
   int a[10000] = {0};

   scanf("%d", &n);

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

   
   count = n;


   for (i = 0; i < n; i++) {
      if (a[i] % 2 == 0){
         count--;
      }

      for (j = 3; j <=a[i]; j+=2) {
         if (a[i] % j == 0) {
            count--;
            break;
         }
      }
   }


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

   return 0;
}


int 

Compiler output:
main.c:38:1: error: expected identifier or '(' at end of input
   38 | int
      | ^~~
Language: C

#include<stdio.h>

int main () {
   int n, i, j, count;
   int a[10000] = {0};

   scanf("%d", &n);

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

   
   count = n;


   for (i = 0; i < n; i++) {
      if (a[i] % 2 == 0){
         count--;
      }

      for (j = 3; j <=a[i]; j+=2) {
         if (a[i] % j == 0) {
            count--;
            break;
         }
      }
   }


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

   return 0;
}


int 

Compiler output:
main.c:37:1: error: expected identifier or '(' at end of input
   37 | int
      | ^~~
Language: C

#include<stdio.h>

int main () {
   int n, i, j, count;
   int a[10000] = {0};

   scanf("%d", &n);

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

   
   count = n;


   for (i = 0; i < n; i++) {
      if (a[i] % 2 == 0){
         count--;
      }

      for (j = 3; j <=a[i]; j = j + 2) {
         if (a[i] % j == 0) {
            count--;
            break;
         }
      }
   }


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

   return 0;
}


int 

Compiler output:
main.c:37:1: error: expected identifier or '(' at end of input
   37 | int
      | ^~~
Language: C

#include<stdio.h>
int main (){

int m[],y,i,n,k,j;

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

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

 scanf("%d\n",&m[i]);

 for(k=0;k<n;k++){
   if(m[i]%k !=0){
    j++;
}
}
}
printf("%d",j);
}

Compiler output:
main.c: In function 'main':
main.c:4:5: error: array size missing in 'm'
    4 | int m[],y,i,n,k,j;
      |     ^
Language: C

#include <stdio.h>
 
int main(){

   int n, x, y, z = 0, r;
   int N[10000];
 
   scanf("%d", &n);

   for (x = 0; x < n; x++)
     scanf("%d", &N[x]);
   for (x = 0; x < n; x++){
     y = 1;
     for (r =2; r <= sqrt(N[x]) && y != 0; r++) {
         y = N[a] % r;
         if (y == 0) z++;
     }
   }
         
   printf("%d\n", n - c);
 
   return 0;
 
}

Compiler output:
main.c: In function 'main':
main.c:14:22: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   14 |      for (r =2; r <= sqrt(N[x]) && y != 0; r++) {
      |                      ^~~~
main.c:2:1: note: include '<math.h>' or provide a declaration of 'sqrt'
    1 | #include <stdio.h>
  +++ |+#include <math.h>
    2 | 
main.c:14:22: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   14 |      for (r =2; r <= sqrt(N[x]) && y != 0; r++) {
      |                      ^~~~
main.c:14:22: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:15:16: error: 'a' undeclared (first use in this function)
   15 |          y = N[a] % r;
      |                ^
main.c:15:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:23: error: 'c' undeclared (first use in this function)
   20 |    printf("%d\n", n - c);
      |                       ^
Language: C

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

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

int main()
{
  int n, i, count;
  int a[100];

  scanf("%d", &n);

  for(i = 0; i < n; i++)
    scanf("%d",&a[i]);
    
  count = 0;
    
  for(i = 0; i < n; i++){
  	if(judge(a[i]))
  	  count++;
  }
  	  
  printf("%d\n", count);

  return 0;
}

Compiler output:
main.c: In function 'judge':
main.c:8:14: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    8 |       return 0;
      |              ^
main.c:4:6: note: declared here
    4 | void judge(int x)
      |      ^~~~~
main.c:10:18: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   10 |           return 1;
      |                  ^
main.c:4:6: note: declared here
    4 | void judge(int x)
      |      ^~~~~
main.c:12:18: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   12 |           return 0;
      |                  ^
main.c:4:6: note: declared here
    4 | void judge(int x)
      |      ^~~~~
main.c:14:24: error: lvalue required as left operand of assignment
   14 |                 if(x%j = 0)
      |                        ^
main.c:15:26: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   15 |                   return 0;
      |                          ^
main.c:4:6: note: declared here
    4 | void judge(int x)
      |      ^~~~~
main.c:17:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   17 |         return 1;
      |                ^
main.c:4:6: note: declared here
    4 | void judge(int x)
      |      ^~~~~
main.c: In function 'main':
main.c:33:12: error: void value not ignored as it ought to be
   33 |         if(judge(a[i]))
      |            ^~~~~
Language: C

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

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

int main()
{
  int n, i, count;
  int a[100];

  scanf("%d", &n);

  for(i = 0; i < n; i++)
    scanf("%d",&a[i]);
    
  count = 0;
    
  for(i = 0; i < n; i++){
  	if(judge(a[i]) == 1)
  	  count++;
  }
  	  
  printf("%d\n", count);

  return 0;
}

Compiler output:
main.c: In function 'judge':
main.c:8:14: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    8 |       return 0;
      |              ^
main.c:4:6: note: declared here
    4 | void judge(int x)
      |      ^~~~~
main.c:10:18: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   10 |           return 1;
      |                  ^
main.c:4:6: note: declared here
    4 | void judge(int x)
      |      ^~~~~
main.c:12:18: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   12 |           return 0;
      |                  ^
main.c:4:6: note: declared here
    4 | void judge(int x)
      |      ^~~~~
main.c:14:24: error: lvalue required as left operand of assignment
   14 |                 if(x%j = 0)
      |                        ^
main.c:15:26: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   15 |                   return 0;
      |                          ^
main.c:4:6: note: declared here
    4 | void judge(int x)
      |      ^~~~~
main.c:17:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   17 |         return 1;
      |                ^
main.c:4:6: note: declared here
    4 | void judge(int x)
      |      ^~~~~
main.c: In function 'main':
main.c:33:12: error: void value not ignored as it ought to be
   33 |         if(judge(a[i]) == 1)
      |            ^~~~~~~~~~~
Language: C

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

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'main':
main.c:7:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    7 |     scanf("%d",&n);
      |     ^~~~~
main.c:3:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    2 | #include<math.h>
  +++ |+#include <stdio.h>
    3 | int main()
main.c:7:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    7 |     scanf("%d",&n);
      |     ^~~~~
main.c:7:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:25:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   25 |   printf("%d\n",ans);
      |   ^~~~~~
main.c:25:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:25:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
int main()
{
    int x, box[10000], i, n, k, ans = 0, m = 0;
   
    scanf("%d", &n);
    for (k = 0; k < n; k++)
        scanf("%d", &box[k]);

    for (x = 0; x < n; x++) {
        if (box[x] == 2)
            ans???= ans + 1;

        if (box[x] % 2 == 1){
            for (i = 3; i <= 100); i += 2)
            {
                if (box[x] % i == 0)
                    m = 1; 
                
                if (m == 0)  
                    ans = ans + 1;
            }
                
            }
    }
    printf("%d\n", ans);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:17: warning: trigraph ??= ignored, use -trigraphs to enable [-Wtrigraphs]
   12 |             ans???= ans + 1;
main.c:12:17: error: expected expression before '?' token
   12 |             ans???= ans + 1;
      |                 ^
main.c:15:33: error: expected ';' before ')' token
   15 |             for (i = 3; i <= 100); i += 2)
      |                                 ^
      |                                 ;
main.c:15:42: error: expected ';' before ')' token
   15 |             for (i = 3; i <= 100); i += 2)
      |                                          ^
      |                                          ;
main.c:15:42: error: expected statement before ')' token
Language: C

#include<stdio.h>
int main()
{
    int x, box[10000], i, n, k, ans = 0, m = 0;
   
    scanf("%d", &n);
    for (k = 0; k < n; k++)
        scanf("%d", &box[k]);

    for (x = 0; x < n; x++) {
        if (box[x] == 2)
            ans = ans + 1;

        if (box[x] % 2 == 1){
            for (i = 3; i <= 100); i += 2)
            {
                if (box[x] % i == 0)
                    m = 1; 
                
                if (m == 0)  
                    ans = ans + 1;
            }
                
            }
    }
    printf("%d\n", ans);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:33: error: expected ';' before ')' token
   15 |             for (i = 3; i <= 100); i += 2)
      |                                 ^
      |                                 ;
main.c:15:42: error: expected ';' before ')' token
   15 |             for (i = 3; i <= 100); i += 2)
      |                                          ^
      |                                          ;
main.c:15:42: error: expected statement before ')' token
Language: C

#include"stdafx.h"

int isprime(int x) {
    if (x == 2)
    return 1;

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

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


int main()
{
    int x, box[10000],  n, k, ans = 0, m=0;

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

    for (x = 0; x < n; x++) {
        ans = isprime(box[x]);

            if (ans == 1)
            m++;

    ans = 0;
}
    
    printf("%d\n", m);
    return 0;
}

Compiler output:
main.c:1:9: fatal error: stdafx.h: No such file or directory
    1 | #include"stdafx.h"
      |         ^~~~~~~~~~
compilation terminated.
Language: C

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

void judge(int num){
  int j = 3;
  if (num==2) {
    return 1;
  } else if (num<2 || num%2==0) {
    return 0;
  } else {
    while (j<=sqrt(num)) {
      if (num%j==0) {
        return 0;
      }
      j=j+2;
    }
    return 1;
  }
}



int main(){
  int Num, n, i;
  int count = 0;
  scanf("%d", &n);

  for (i=0; i<n; i++) {
    scanf("%d", &Num);
    count=count+judge(Num);
  }
  printf("%d\n", count);
  return 0;
}

Compiler output:
main.c: In function 'judge':
main.c:7:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    7 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:9:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    9 |     return 0;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:13:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |         return 0;
      |                ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:17:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   17 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c: In function 'main':
main.c:30:17: error: void value not ignored as it ought to be
   30 |     count=count+judge(Num);
      |                 ^~~~~~~~~~
Language: C

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

void judge(int num){
  int j = 3;
  if (num==2) {
    return 1;
  } else if (num<2 || num%2==0) {
    return 0;
  } else {
    while (j<=sqrt(num)) {
      if (num%j==0) {
        return 0;
        break;
      }
      j=j+2;
    }
    return 1;
  }
}

int main(){
  int n, Num, i;
  int count = 0;
  scanf("%d", &n);

  for (i=0; i<n; i++) {
    scanf("%d", &Num);
    count=count+judge(Num);
  }

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

Compiler output:
main.c: In function 'judge':
main.c:7:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    7 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:9:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    9 |     return 0;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:13:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |         return 0;
      |                ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:18:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   18 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c: In function 'main':
main.c:29:17: error: void value not ignored as it ought to be
   29 |     count=count+judge(Num);
      |                 ^~~~~~~~~~
Language: C

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

void judge(int num){
  int j = 3;
  if (num==2) {
    return 1;
  } else if (num<2 || num%2==0) {
    return 0;
  } else {
    while (j<=sqrt(num)) {
      if (num%j==0)
        return 0;
      j=j+2;
    }
    return 1;
  }
}

int main(){
  int n, Num, i;
  int count = 0;
  scanf("%d", &n);

  for (i=0; i<n; i++) {
    scanf("%d", &Num);
    judge(Num);
    if (judge(Num)==1)
      count++;
  }

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

Compiler output:
main.c: In function 'judge':
main.c:7:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    7 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:9:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    9 |     return 0;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:13:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |         return 0;
      |                ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:16:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   16 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c: In function 'main':
main.c:28:9: error: void value not ignored as it ought to be
   28 |     if (judge(Num)==1)
      |         ^~~~~~~~~~
Language: C

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

void judge(int num){
  int j = 3;
  if (num==2) {
    return 1;
  } else if (num<2 || num%2==0) {
    return 0;
  } else {
    while (j<=sqrt(num)) {
      if (num%j==0)
        return 0;
      j=j+2;
    }
    return 1;
  }
}

int main(){
  int n, Num, i;
  int count = 0;
  scanf("%d", &n);

  for (i=0; i<n; i++) {
    scanf("%d", &Num);
    count=count+judge(Num);
  }

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

Compiler output:
main.c: In function 'judge':
main.c:7:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    7 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:9:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    9 |     return 0;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:13:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |         return 0;
      |                ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:16:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   16 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c: In function 'main':
main.c:27:17: error: void value not ignored as it ought to be
   27 |     count=count+judge(Num);
      |                 ^~~~~~~~~~
Language: C

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

void judge(int num){
  int j = 3;
  if (num==2) {
    return 1;
  } else if (num<2 || num%2==0) {
    return 0;
  } else {
    while (j<=sqrt(num)) {
      if (num%j==0) {
        return 0;
      }
      j=j+2;
    }
    return 1;
  }
}

int main(){
  int n, Num, i;
  int count = 0;
  scanf("%d", &n);

  for (i=0; i<n; i++) {
    scanf("%d", &Num);
    count=count+judge(Num);
  }

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

Compiler output:
main.c: In function 'judge':
main.c:7:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    7 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:9:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    9 |     return 0;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:13:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |         return 0;
      |                ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:17:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   17 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c: In function 'main':
main.c:28:17: error: void value not ignored as it ought to be
   28 |     count=count+judge(Num);
      |                 ^~~~~~~~~~
Language: C

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

void judge(int num){
  int j = 3;
  if (num==2) {
    return 1;
  } else if (num<2 || num%2==0) {
    return 0;
  } else {
    while (j<=sqrt(num)) {
      if (num%j==0) {
        return 0;
      }
      j=j+2;
    }
  }
  return 1;
}

int main(){
  int n, Num, i;
  int count = 0;
  scanf("%d", &n);

  for (i=0; i<n; i++) {
    scanf("%d", &Num);
    count=count+judge(Num);
  }

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

Compiler output:
main.c: In function 'judge':
main.c:7:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    7 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:9:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    9 |     return 0;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:13:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |         return 0;
      |                ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:18:10: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   18 |   return 1;
      |          ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c: In function 'main':
main.c:28:17: error: void value not ignored as it ought to be
   28 |     count=count+judge(Num);
      |                 ^~~~~~~~~~
Language: C

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

void judge(int num){
  int j = 3;
  if (num==2) {
    return 1;
  } else if (num<2 || num%2==0) {
    return 0;
  } else {
    while (j<=sqrt(num)) {
      if (num%j==0) {
        return 0;
      }
      j=j+2;
    }
    return 1;
  }
 }

int main(){
  int n, Num, i;
  int count = 0;
  scanf("%d", &n);

  for (i=0; i<n; i++) {
    scanf("%d", &Num);
    count=count+judge(Num);
  }

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

Compiler output:
main.c: In function 'judge':
main.c:7:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    7 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:9:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    9 |     return 0;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:13:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |         return 0;
      |                ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:17:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   17 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c: In function 'main':
main.c:28:17: error: void value not ignored as it ought to be
   28 |     count=count+judge(Num);
      |                 ^~~~~~~~~~
Language: C

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

void judge(int num){
  int j = 3;
  if (num==2) {
    return 1;
  } else if (num<2 || num%2==0) {
    return 0;
  } else {
    while (j<=sqrt(num)) {
      if (num%j==0) {
        return 0;
      }
      j=j+2;
    }
    return 1;
  }
 }

int main(void){
  int n, Num, i;
  int count = 0;
  scanf("%d", &n);

  for (i=0; i<n; i++) {
    scanf("%d", &Num);
    count=count+judge(Num);
  }

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

Compiler output:
main.c: In function 'judge':
main.c:7:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    7 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:9:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    9 |     return 0;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:13:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |         return 0;
      |                ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:17:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   17 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c: In function 'main':
main.c:28:17: error: void value not ignored as it ought to be
   28 |     count=count+judge(Num);
      |                 ^~~~~~~~~~
Language: C

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

void judge(int num){
  int j = 3;
  if (num==2) {
    return 1;
  } else if (num<2 || num%2==0) {
    return 0;
  } else {
    while (j<=sqrt(num)) {
      if (num%j==0) {
        return 0;
      }
      j=j+2;
    }
    return 1;
  }
 }

int main(){
  int n, num, i;
  int count = 0;
  scanf("%d", &n);

  for (i=0; i<n; i++) {
    scanf("%d", &num);
    count=count+judge(num);
  }

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

Compiler output:
main.c: In function 'judge':
main.c:7:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    7 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:9:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    9 |     return 0;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:13:16: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   13 |         return 0;
      |                ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c:17:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   17 |     return 1;
      |            ^
main.c:4:6: note: declared here
    4 | void judge(int num){
      |      ^~~~~
main.c: In function 'main':
main.c:28:17: error: void value not ignored as it ought to be
   28 |     count=count+judge(num);
      |                 ^~~~~~~~~~
Language: C

x,i,t;
a(x){
    if(x==2)return 1;
    if(x<2||x%2==0)return 0;
    for(i=3;i<=sqrt(x);i+=2){
        if(x%i==0)return 0;
    }
    return 1;
}
main(){
    for(gets(x);~scanf("%d",&x);t+=a(x));
    printf("%d\n",t);
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | x,i,t;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
    1 | x,i,t;
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
    1 | x,i,t;
      |     ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | a(x){
      | ^
main.c: In function 'a':
main.c:2:1: error: type of 'x' defaults to 'int' [-Wimplicit-int]
main.c:5:16: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
    5 |     for(i=3;i<=sqrt(x);i+=2){
      |                ^~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'sqrt'
  +++ |+#include <math.h>
    1 | x,i,t;
main.c:5:16: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
    5 |     for(i=3;i<=sqrt(x);i+=2){
      |                ^~~~
main.c:5:16: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c: At top level:
main.c:10:1: error: return type defaults to 'int' [-Wimplicit-int]
   10 | main(){
      | ^~~~
main.c: In function 'main':
main.c:11:9: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
   11 |     for(gets(x);~scanf("%d",&x);t+=a(x));
      |         ^~~~
main.c:11:18: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |     for(gets(x);~scanf("%d",&x);t+=a(x));
      |                  ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | x,i,t;
main.c:11:18: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |     for(gets(x);~scanf("%d",&x);t+=a(x));
      |                  ^~~~~
main.c:11:18: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:12:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   12 |     printf("%d\n",t);
      |     ^~~~~~
main.c:12:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:12:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:12:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int main(void)
{
 int n,m[10000],i,j,ans=0;

 scanf("%d",&n);

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

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

  while(1){

   if(m[i]==2){
     ans++;
     break;
   }

   if(x<2 || x%2==0) break;

   j=3;
   while( i<=sqrt(m[i]) ){
    if(x%m[i]==0) break;
    i=i+2;
   }
   ans++;
   break;
  }
 }

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

 return 0;
 
}
 

Compiler output:
main.c: In function 'main':
main.c:22:7: error: 'x' undeclared (first use in this function)
   22 |    if(x<2 || x%2==0) break;
      |       ^
main.c:22:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:25:14: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   25 |    while( i<=sqrt(m[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:14: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   25 |    while( i<=sqrt(m[i]) ){
      |              ^~~~
main.c:25:14: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C

#include<stdio.h>
int main()
{
  int m[10000],n,x,y;
  int count;

     scanf("%d",&n);
   for(x=0;x<n;x++)
     scanf("%d",&m[x]);
   
  for(x=0;x<n;x++){
   while(1){

   if(m[x]==2)
    count++,break;

   if(m[x]<2||m[x]%2==0)
      break;
   
    y=3
   while(y<=m[x]){
    if(m[x]%y==0)
       break;
    
     j=j+2;
}

  if(m[x]%j != 0){
    count++;
    break;
}
}

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:13: error: expected expression before 'break'
   15 |     count++,break;
      |             ^~~~~
main.c:20:8: error: expected ';' before 'while'
   20 |     y=3
      |        ^
      |        ;
   21 |    while(y<=m[x]){
      |    ~~~~~
main.c:37:1: error: expected declaration or statement at end of input
   37 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
  int m[10000],n,x,y;
  int count;

     scanf("%d",&n);
   for(x=0;x<n;x++)
     scanf("%d",&m[x]);
   
  for(x=0;x<n;x++){
    while(1){

    if(m[x]==2)
     count++,break;

    if(m[x]<2||m[x]%2==0)
       break;
   
    y=3;
    while(y<=m[x]){
    if(m[x]%y==0)
        break;
    
     j=j+2;
}

  if(m[x]%j != 0){
    count++;
    break;
}
}

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:14: error: expected expression before 'break'
   15 |      count++,break;
      |              ^~~~~
main.c:25:6: error: 'j' undeclared (first use in this function)
   25 |      j=j+2;
      |      ^
main.c:25:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:37:1: error: expected declaration or statement at end of input
   37 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
  int m[10000],n,x,y;
  int count;

     scanf("%d",&n);
   for(x=0;x<n;x++)
     scanf("%d",&m[x]);
   
  for(x=0;x<n;x++){
    while(1){

    if(m[x]==2)
     count++,break;

    if(m[x]<2||m[x]%2==0)
       break;
   
    y=3;
    while(y*y<=m[x]){
    if(m[x]%y==0)
        break;
    
     j=j+2;
}

  if(m[x]%j != 0){
    count++;
    break;
}
}

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:14: error: expected expression before 'break'
   15 |      count++,break;
      |              ^~~~~
main.c:25:6: error: 'j' undeclared (first use in this function)
   25 |      j=j+2;
      |      ^
main.c:25:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:37:1: error: expected declaration or statement at end of input
   37 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
  int m[10000],n,x,y;
  int count;

     scanf("%d",&n);
   for(x=0;x<n;x++)
     scanf("%d",&m[x]);
   
  for(x=0;x<n;x++){
    while(1){

    if(m[x]==2)
     count++,break;

    if(m[x]<2||m[x]%2==0)
       break;
   
    y=3;
    while(y*y<=m[x]){
    if(m[x]%y==0)
        break;
    }
     j=j+2;
}

  if(m[x]%j != 0){
    count++;
    break;
}
}

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:14: error: expected expression before 'break'
   15 |      count++,break;
      |              ^~~~~
main.c:25:6: error: 'j' undeclared (first use in this function)
   25 |      j=j+2;
      |      ^
main.c:25:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main()
{
  int m[10000],n,x,y;
  int count;

     scanf("%d",&n);
   for(x=0;x<n;x++)
     scanf("%d",&m[x]);
   
  for(x=0;x<n;x++){
    while(1){

    if(m[x]==2){
     count++;
     break;}

    if(m[x]<2||m[x]%2==0)
       break;
   
    y=3;
    while(y*y<=m[x]){
    if(m[x]%y==0)
        break;
    
     j=j+2;


  if(m[x]%j != 0){
    count++;
    break;
 }
}
}

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:6: error: 'j' undeclared (first use in this function)
   26 |      j=j+2;
      |      ^
main.c:26:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:39:1: error: expected declaration or statement at end of input
   39 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
  int m[10000],n,x,y;
  int count;

     scanf("%d",&n);
   for(x=0;x<n;x++)
     scanf("%d",&m[x]);
   
  for(x=0;x<n;x++){
    while(1){

    if(m[x]==2){
     count++;
     break;
}

    if(m[x]<2 || m[x]%2==0)
       break;
   
    y=3;
    while(y*y<=m[x]){
    if(m[x]%y==0)
        break;
    
     y=y+2;
}

  if(m[x]%j != 0){
    count++;
    break;
 }

}

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

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:30:11: error: 'j' undeclared (first use in this function)
   30 |   if(m[x]%j != 0){
      |           ^
main.c:30:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:40:1: error: expected declaration or statement at end of input
   40 | }
      | ^