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

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

int isPrimeNumber(int v)
{
    int i, count;
 
    count = 0;
    if (v == 0 || v == 1) {
        return 0;
    }
    else if (v == 2 || v == 3) {
        return 1;
    }
    else if (v % 2 == 0) {
        return 0;
    }
    else {
        for (i = 1; i <= sqrt((double)v); i += 2) {
            if (v % i == 0) {
                count++;
 
                if (count > 1) {
                    return 0;
                }
            }
        }
    }
    return 1;
}

int main(int argc, char** argv)
{
    int N, i, aaa, bbb;
    result = 0;
 
    scanf("%d", &N);
 
    for (i = 0; i < N; i++) {
        scanf("%d", &aaa);
 
        if (isPrimeNumber(aaa)) {
            bbb++;
        }
    }
 
    printf("%d\n", bbb);
    return 0;
}



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

#include <stdio.h>


int main(){
  int i,j;

  int n,cnt=0;
  int flg;
  int A[10000]


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

    for(j=2;j<A[i];j++){
      if( (A[i] % j) == 0 ){
	flg = 1;
	break;
      }
    }

     if( flg == 0) cnt ++;


  }
 
  //output
  printf("%d\n",cnt);


  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:12:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
   12 |   scanf("%d",&n);
      |   ^~~~~
main.c:15:17: error: 'A' undeclared (first use in this function)
   15 |     scanf("%d",&A[i]);
      |                 ^
main.c:15:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <math.h>
bool isPrime(int p) {
	int i=0;
	if(p < 2) {
		return false;
	}	else if (p ==2) {
		return true;
	}
		else if (p % 2 == 0) {
			return false;
		}
		for(i = 3; i<=sqrt(p);i+=2) {
			if(p%i==0) {
				return false;
			}
		return true;
		}
}


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


Compiler output:
main.c:3:1: error: unknown type name 'bool'
    3 | bool isPrime(int p) {
      | ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include <math.h>
  +++ |+#include <stdbool.h>
    3 | bool isPrime(int p) {
main.c: In function 'isPrime':
main.c:6:24: error: 'false' undeclared (first use in this function)
    6 |                 return false;
      |                        ^~~~~
main.c:6:24: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:6:24: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:24: error: 'true' undeclared (first use in this function)
    8 |                 return true;
      |                        ^~~~
main.c:8:24: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include <stdio.h>

int isPrimeNumber(int target_number);
 
int main ( void ) {
	int target_number = 0;
	int loop = 0;
	int Max_number = 0;
	int number_of_prime_numbers = 0;
	int flag_not_prime_number = 0;
	
	scanf ( "%d", &Max_number );
	for ( loop = 0; loop < Max_number; loop++ ) {
		scanf ( "%d", &target_number );
		flag_not_prime_number = isPrimeNumber(target_number);
		 
		if ( flag_not_prime_number == 0 ) {
			number_of_prime_numbers++;
		}
	}
	printf("%d\n", number_of_prime_number);
	return 0;
}

int isPrimeNumber(int target_number)
{
	
	int flag_not_prime_number = 0;
	int divisor = 2;
	
	
	if ( target_number == 4 ) {
		flag_not_prime_number = 1;
	}
	 
	while ( divisor*divisor <= target_number ) {
		if ( target_number % divisor == 0 ) {
			flag_not_prime_number = 1;
			break;
		}
		divisor++;
	}
	return flag_not_prime_number = 1;
}


Compiler output:
main.c: In function 'main':
main.c:21:24: error: 'number_of_prime_number' undeclared (first use in this function); did you mean 'number_of_prime_numbers'?
   21 |         printf("%d\n", number_of_prime_number);
      |                        ^~~~~~~~~~~~~~~~~~~~~~
      |                        number_of_prime_numbers
main.c:21:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

 void isPrime(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+=2){
                                         if(x%i==0)return 0;
                                          }
                     return 1;
                     }


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




Compiler output:
main.c: In function 'isPrime':
main.c:6:36: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    6 |                      if(x<2)return 0;
      |                                    ^
main.c:3:7: note: declared here
    3 |  void isPrime(int x){
      |       ^~~~~~~
main.c:7:42: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    7 |                      else if(x==2)return 1;
      |                                          ^
main.c:3:7: note: declared here
    3 |  void isPrime(int x){
      |       ^~~~~~~
main.c:8:39: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    8 |                      if(x%2==0)return 0;
      |                                       ^
main.c:3:7: note: declared here
    3 |  void isPrime(int x){
      |       ^~~~~~~
main.c:10:59: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   10 |                                          if(x%i==0)return 0;
      |                                                           ^
main.c:3:7: note: declared here
    3 |  void isPrime(int x){
      |       ^~~~~~~
main.c:12:29: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   12 |                      return 1;
      |                             ^
main.c:3:7: note: declared here
    3 |  void isPrime(int x){
      |       ^~~~~~~
main.c: In function 'main':
main.c:21:38: error: void value not ignored as it ought to be
   21 |                              num=num+isPrime(x);
      |                                      ^~~~~~~~~~
Language: C

#include<stdio.h>

 void isPrime(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+=2){
                                         if(x%i==0)return 0;
                                          }
                     return 1;
                     }


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




Compiler output:
main.c: In function 'isPrime':
main.c:6:36: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    6 |                      if(x<2)return 0;
      |                                    ^
main.c:3:7: note: declared here
    3 |  void isPrime(int x){
      |       ^~~~~~~
main.c:7:42: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    7 |                      else if(x==2)return 1;
      |                                          ^
main.c:3:7: note: declared here
    3 |  void isPrime(int x){
      |       ^~~~~~~
main.c:8:39: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
    8 |                      if(x%2==0)return 0;
      |                                       ^
main.c:3:7: note: declared here
    3 |  void isPrime(int x){
      |       ^~~~~~~
main.c:10:59: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   10 |                                          if(x%i==0)return 0;
      |                                                           ^
main.c:3:7: note: declared here
    3 |  void isPrime(int x){
      |       ^~~~~~~
main.c:12:29: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   12 |                      return 1;
      |                             ^
main.c:3:7: note: declared here
    3 |  void isPrime(int x){
      |       ^~~~~~~
main.c: In function 'main':
main.c:21:33: error: void value not ignored as it ought to be
   21 |                              if(isPrime(x))num++;
      |                                 ^~~~~~~
Language: C

#include <stdio.h>

main(){
   int a[], n, i, j, k, l;

    scanf("%d", &n);

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

   for(i = 0; i < n; i++) {
   for(j = 1; j < n[i] + 1; j++) {
      if (n[i] % j == 0){
         k++;
      }

      if (k == 2){
         l++;
      }
   }
   }

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

   return 0;
}


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:8: error: array size missing in 'a'
    4 |    int a[], n, i, j, k, l;
      |        ^
main.c:9:21: error: subscripted value is neither array nor pointer nor vector
    9 |       scanf("%d", &n[i]);
      |                     ^
main.c:13:20: error: subscripted value is neither array nor pointer nor vector
   13 |    for(j = 1; j < n[i] + 1; j++) {
      |                    ^
main.c:14:12: error: subscripted value is neither array nor pointer nor vector
   14 |       if (n[i] % j == 0){
      |            ^
Language: C

#include <stdio.h>

main(){
   int a[], n, i, j, k, l;

    scanf("%d", &n);

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

   for(i = 0; i < n; i++) {
   for(j = 1; j < a[i] + 1; j++) {
      if (a[i] % j == 0){
         k++;
      }

      if (k == 2){
         l++;
      }
   }
   }

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

   return 0;
}


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:8: error: array size missing in 'a'
    4 |    int a[], n, i, j, k, l;
      |        ^
Language: C

#include <stdio.h>

main(){
   int a[n], n, i, j, k, l;

   scanf("%d", &n);

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

   for(i = 0; i < n; i++) {
   for(j = 1; j < a[i] + 1; j++) {
      if (a[i] % j == 0){
         k++;
      }

      if (k == 2){
         l++;
      }
   }
   }

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

   return 0;
}


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:10: error: 'n' undeclared (first use in this function)
    4 |    int a[n], n, i, j, k, l;
      |          ^
main.c:4:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

main(){
   int a[n], n, i, j, k, l;

   scanf("%d", &n);

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

   k = 0;
   l = 0;

   for(i = 0; i < n; i++) {
   for(j = 1; j < a[i] + 1; j++) {
      if (a[i] % j == 0){
         k++;
      }

      if (k == 2){
         l++;
      }
   }
   }

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

   return 0;
}


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:10: error: 'n' undeclared (first use in this function)
    4 |    int a[n], n, i, j, k, l;
      |          ^
main.c:4:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
   int n, i, j, k, l;

   scanf("%d", &n);

   int a[n];

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


   l = 0;




   for(i = 0; i < n; i++) {
      if (a[i] < 3||a[i] % 2 == 1){
         if (a[i] < 6||a[i] % 5 != 0)

   k = 0;

   j = 1;
   do {

      if (a[i] % j == 0){
         k++;
      }
      if (k > 2){
         break;
      }
      j++;

   } while(j < a[i] + 1);


      if (k == 2){
         l++;
      }
      }
      }
   }

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

   return 0;
}


Compiler output:
main.c:47:11: error: expected declaration specifiers or '...' before string constant
   47 |    printf("%d\n", l);
      |           ^~~~~~
main.c:47:19: error: unknown type name 'l'
   47 |    printf("%d\n", l);
      |                   ^
main.c:49:4: error: expected identifier or '(' before 'return'
   49 |    return 0;
      |    ^~~~~~
main.c:50:1: error: expected identifier or '(' before '}' token
   50 | }
      | ^
Language: C

#include <stdio.h>

int main(void){
   int n, i, j, k, l, s;

   scanf("%d", &n);

   int a[n];

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


   l = 0;

   for(i = 0; i < n; i++) {
      if (a[i] < 4||a[i] % 2 == 1){
      if (a[i] == 3||a[i] % 3 != 0){

   double sqrt(a[n]);

   k = 0;
   for(j = 1; j < sqrt(a[j]) + 1; j++) {
      if (a[i] % j == 0){
         k++;
      }
   }
      if (k == 2){
         l++;
      }
      }
      }
   }

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

   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:21:16: error: expected declaration specifiers or '...' before 'a'
   21 |    double sqrt(a[n]);
      |                ^
main.c:24:19: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   24 |    for(j = 1; j < sqrt(a[j]) + 1; 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:24:19: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   24 |    for(j = 1; j < sqrt(a[j]) + 1; j++) {
      |                   ^~~~
main.c:24:19: note: include '<math.h>' or provide a declaration of 'sqrt'
Language: C

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

int main(void){
   int n, i, j, k, l;

   scanf("%d", &n);

   double a[n];

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


   l = 0;

   for(i = 0; i < n; i++) {
      if (a[i] < 4||a[i] % 2 == 1){
      if (a[i] == 3||a[i] % 3 != 0){

   double s = sqrt(a[i]);

   k = 0;
   for(j = 1; j < s + 1; j++) {
      if (a[i] % j == 0){
         k++;
      }
   }
      if (k == 1){
         l++;
      }
      }
      }
   }

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

   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:26: error: invalid operands to binary % (have 'double' and 'int')
   19 |       if (a[i] < 4||a[i] % 2 == 1){
      |                     ~~~~ ^
      |                      |
      |                      double
main.c:20:27: error: invalid operands to binary % (have 'double' and 'int')
   20 |       if (a[i] == 3||a[i] % 3 != 0){
      |                      ~~~~ ^
      |                       |
      |                       double
main.c:26:16: error: invalid operands to binary % (have 'double' and 'int')
   26 |       if (a[i] % j == 0){
      |           ~~~~ ^
      |            |
      |            double
Language: C

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

int main(void){
   int n, i, j, k, l;

   scanf("%d", &n);

   double a[n];

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


   l = 0;

   for(i = 0; i < n; i++) {
      if (a[i] < 4||a[i] % 2 == 1){
      if (a[i] == 3||a[i] % 3 != 0){

   double s = sqrt(a[i]);

   k = 0;
   for(j = 1; j < s + 1; j++) {
      if (a[i] % j == 0){
         k++;
      }
   }
      if (k == 1){
         l++;
      }
      }
      }
   }

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

   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:26: error: invalid operands to binary % (have 'double' and 'int')
   19 |       if (a[i] < 4||a[i] % 2 == 1){
      |                     ~~~~ ^
      |                      |
      |                      double
main.c:20:27: error: invalid operands to binary % (have 'double' and 'int')
   20 |       if (a[i] == 3||a[i] % 3 != 0){
      |                      ~~~~ ^
      |                       |
      |                       double
main.c:26:16: error: invalid operands to binary % (have 'double' and 'int')
   26 |       if (a[i] % j == 0){
      |           ~~~~ ^
      |            |
      |            double
Language: C

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

int main(void){
   int n, i, j, k, l;

   scanf("%d", &n);

   double a[n];

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


   l = 0;

   for(i = 0; i < n; i++) {
      if (a[i] < 4||a[i] % 2 == 1){
      if (a[i] == 3||a[i] % 3 != 0){

   double s = sqrt(a[i]);

   k = 0;
   for(j = 1; j < s + 1; j++) {
      if (a[i] % j == 0){
         k++;
      }
   }
      if (k == 1){
         l++;
      }
      }
      }
   }

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

   return 0;
}



Compiler output:
main.c: In function 'main':
main.c:19:26: error: invalid operands to binary % (have 'double' and 'int')
   19 |       if (a[i] < 4||a[i] % 2 == 1){
      |                     ~~~~ ^
      |                      |
      |                      double
main.c:20:27: error: invalid operands to binary % (have 'double' and 'int')
   20 |       if (a[i] == 3||a[i] % 3 != 0){
      |                      ~~~~ ^
      |                       |
      |                       double
main.c:26:16: error: invalid operands to binary % (have 'double' and 'int')
   26 |       if (a[i] % j == 0){
      |           ~~~~ ^
      |            |
      |            double
Language: C

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

int main(void){
   int n, i, j, k, l;

   scanf("%d", &n);

   double a[n];

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


   l = 0;

   for(i = 0; i < n; i++) {
      if (a[i] < 4||a[i] % 2 == 1){
      if (a[i] == 3||a[i] % 3 != 0){

   k = 0;
   for(j = 1; j < sqrt(a[i]) + 1; j++) {
      if (a[i] % j == 0){
         k++;
      }
   }
      if (k == 1){
         l++;
      }
      }
      }
   }

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

   return 0;
}



Compiler output:
main.c: In function 'main':
main.c:19:26: error: invalid operands to binary % (have 'double' and 'int')
   19 |       if (a[i] < 4||a[i] % 2 == 1){
      |                     ~~~~ ^
      |                      |
      |                      double
main.c:20:27: error: invalid operands to binary % (have 'double' and 'int')
   20 |       if (a[i] == 3||a[i] % 3 != 0){
      |                      ~~~~ ^
      |                       |
      |                       double
main.c:24:16: error: invalid operands to binary % (have 'double' and 'int')
   24 |       if (a[i] % j == 0){
      |           ~~~~ ^
      |            |
      |            double
Language: C

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

int main(void){
   int n, i, j, k, l;

   scanf("%d", &n);

   double a[n];

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


   l = 0;

   for(i = 0; i < n; i++) {
      if (a[i] < 4||a[i] % 2 == 1){
      if (a[i] == 3||a[i] % 3 != 0){

   k = 0;
   for(j = 1; j < sqrt(a[i]) + 1; j++) {
      if (a[i] % j == 0){
         k++;
      }
   }
      if (k == 1){
         l++;
      }
      }
      }
   }

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

   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:26: error: invalid operands to binary % (have 'double' and 'int')
   19 |       if (a[i] < 4||a[i] % 2 == 1){
      |                     ~~~~ ^
      |                      |
      |                      double
main.c:20:27: error: invalid operands to binary % (have 'double' and 'int')
   20 |       if (a[i] == 3||a[i] % 3 != 0){
      |                      ~~~~ ^
      |                       |
      |                       double
main.c:24:16: error: invalid operands to binary % (have 'double' and 'int')
   24 |       if (a[i] % j == 0){
      |           ~~~~ ^
      |            |
      |            double
Language: C

#include <stdio.h>

int main(void)
{
	int num, i, j, n = 0;
	float x, y;

	scanf("%d", &num);

	for (j = 0; j < num; j++) {
		scanf("%f", &x);
		if (x == 2) {
			n++;
		}
		else if (x > 2 && x % 2 == 1) {
			i = 3;
			y = sqrt(x);
			while (i < y) {
				if (x % i == 0) {
					break;
				}
			}
			i++;
			if (i > y) {
				n++;
			}
		}

	}

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

	return 0;


Compiler output:
main.c: In function 'main':
main.c:15:37: error: invalid operands to binary % (have 'float' and 'int')
   15 |                 else if (x > 2 && x % 2 == 1) {
      |                                     ^
main.c:17:29: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   17 |                         y = 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:17:29: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   17 |                         y = sqrt(x);
      |                             ^~~~
main.c:17:29: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:19:39: error: invalid operands to binary % (have 'float' and 'int')
   19 |                                 if (x % i == 0) {
      |                                       ^
main.c:33:9: error: expected declaration or statement at end of input
   33 |         return 0;
      |         ^~~~~~
Language: C

import math
count = 0

for i =in range(10000):
    n = int(input())
    if i == 2:
        count += 1
    else:
        for j in range(3, 100000000, 2):
            k = math.sqrt(n)
            if j > k
                break
            if n % j == 0:
                count += 1
                break
    print(count)


Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import math
      | ^~~~~~
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'count'
    2 | count = 0
      | ^~~~~
Language: C

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

int main(void){
   int n, i, j, k, l;

   scanf("%d", &n);

   int a[n];

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


   l = 0;

   for(i = 0; i < n; i++) {
      if (a[i] > 2&&|a[i] % 2 == 1){
      if (a[i] == 3||a[i] % 3 != 0){

   k = 0;
   for(j = 1; j <= sqrt(a[i]); j++) {
      if (a[i] % j == 0){
         k++;
      }
   }
      if (k == 2){
         l++;
      }
      }
      } else if (a[i] == 2){
        l++;
      }
   }

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

   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:19:21: error: expected expression before '|' token
   19 |       if (a[i] > 2&&|a[i] % 2 == 1){
      |                     ^
Language: C

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

int main(){
    int n, i, j, k;
    float sqr;
    int input_list[10000];
    int output_list[10000];
    
    scanf("%d", &n);
    
    for(i = 0; i < n; i++){
        scanf("%d", &input_list[i]);
    }
    
    j = 0;
    for(i = 0; i < n; i++){
        sqr = sqrt(input_list[i]);
        for(k = 2; k < sqr; k++){
            if(input_list % k == 0){
                break;
            }
        }
        if(k == (int)sqr + 1){
            output_list[j++] = inputlist[i];
        }
    }
    
    for(i = 0; i < j; i++){
        printf("%d\n", output_list[i]);
    }
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:20:27: error: invalid operands to binary % (have 'int *' and 'int')
   20 |             if(input_list % k == 0){
      |                ~~~~~~~~~~ ^
      |                |
      |                int *
main.c:25:32: error: 'inputlist' undeclared (first use in this function); did you mean 'input_list'?
   25 |             output_list[j++] = inputlist[i];
      |                                ^~~~~~~~~
      |                                input_list
main.c:25:32: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(){
    int n, i, j, k;
    float sqr;
    int input_list[10000];
    int output_list[10000];
    
    scanf("%d", &n);
    
    for(i = 0; i < n; i++){
        scanf("%d", &input_list[i]);
    }
    
    j = 0;
    for(i = 0; i < n; i++){
        sqr = sqrt(input_list[i]);
        for(k = 2; k < sqr; k++){
            if(input_list[i] % k == 0){
                break;
            }
        }
        if(k == (int)sqr + 1){
            output_list[j++] = inputlist[i];
        }
    }
    
    for(i = 0; i < j; i++){
        printf("%d\n", output_list[i]);
    }
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:25:32: error: 'inputlist' undeclared (first use in this function); did you mean 'input_list'?
   25 |             output_list[j++] = inputlist[i];
      |                                ^~~~~~~~~
      |                                input_list
main.c:25:32: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(){
    int n, i, k, count;
    float sqr;
    int input_list[10000];
    
    scanf("%d", &n);
    
    for(i = 0; i < n; i++){
        scanf("%d", &input_list[i]);
    }
    
    j = 0;
    for(i = 0; i < n; i++){
        sqr = sqrt(input_list[i]);
        for(k = 2; k < sqr; k++){
            if(input_list[i] % k == 0){
                break;
            }
        }
        if(k > (int)sqr){
            count++;
        }
    }
    printf("%d\n", count);
    
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:15:5: error: 'j' undeclared (first use in this function)
   15 |     j = 0;
      |     ^
main.c:15:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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


int main () {

    int i, j, n, x, c;

    c = 0;

    scsnf("%d", &n);

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

        scanf("%d", &x);

        for (j = 2; j <= sqrt(x); j++) {

            if (j == sqrt(x)) {
                c += 1;
                break;
            } else if (x % j == 0) {
                break;
        }

    }

    return 0;

}


Compiler output:
main.c: In function 'main':
main.c:11:5: error: implicit declaration of function 'scsnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   11 |     scsnf("%d", &n);
      |     ^~~~~
      |     scanf
main.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

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


int main () {

    int i, j, n, x, c;

    c = 0;

    scsnf("%d", &n);

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

        scanf("%d", &x);

        for (j = 2; j <= sqrt(x); j++) {

            if (j == sqrt(x)) {
                c += 1;
                break;
            } else if (x % j == 0) {
                break;
            }

        }

    }

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

    return 0;

}


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

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

int main () {

    int i, j, n, x, c;

    c = 0;

    scsnf("%d", &n);

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

        scanf("%d", &x);

        for (j = 2; j <= sqrt(x); j++) {

            if (j == sqrt(x)) {
                c += 1;
                break;
            } else if (x % j == 0) {
                break;
            }

        }

    }

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

    return 0;

}


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

include<stdio.h>

int main(void){

int a[10000],b[10000]=0,i,k,n,ans=0;

scanf("%d",&n);

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

for(k=2;k<a[i];k++){
 if(a[i]%k==0)
  break;
 else 
 b[i]++;
}

if(b[i]==a[i]-2)
ans++;
}

printf(“%d\n”,ans)

}



Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c:23:8: error: stray '\342' in program
   23 | printf(<U+201C>%d\n<U+201D>,ans)
      |        ^~~~~~~~
main.c:23:11: error: stray '\' in program
   23 | printf(“%d\n”,ans)
      |           ^
main.c:23:13: error: stray '\342' in program
   23 | printf(<U+201C>%d\n<U+201D>,ans)
      |                    ^~~~~~~~
Language: C

#include<stdio.h>

int main(void){

int a[10000],b[10000]={0},i,k,n,ans=0;

scanf("%d",&n);

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

for(k=2;k<a[i];k++){
 if(a[i]%k==0)
  break;
 else 
 b[i]++;
}

if(b[i]==a[i]-2)
ans++;
}

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

}

 



Compiler output:
main.c:27:1: error: stray '\342' in program
   27 | <U+2003>
      | ^~~~~~~~
Language: C

#include<stdio.h>

int main(void){

int a[10000],i,k,n;
int b[10000]={0},ans=0;

scanf("%d",&n);

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

for(k=2;k<a[i];k++){
 if(a[i]%k==0)
  break;
 else 
 b[i]++;
}

if(b[i]==a[i]-2)
ans++;
}

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

}


 



Compiler output:
main.c:29:1: error: stray '\342' in program
   29 | <U+2003>
      | ^~~~~~~~
Language: C

#include <stdio.h>

int main()
{
   int n, i;
   int j, a;
   int x[10000];

   scanf(“%d¥n”, &n);

   for(i = 0; i < n; i++){
      scanf(“%d¥n”, &x[n]);
  
      for(j = 2; j <= sqrt(x[i]); j++){
         if(x[i] % j == 0){
            break;
         }

         a = a + 1;
      }
   }

   printf(“%d¥n”, a);

   return 0;
}




Compiler output:
main.c: In function 'main':
main.c:9:10: error: stray '\342' in program
    9 |    scanf(<U+201C>%d<U+00A5>n<U+201D>, &n);
      |          ^~~~~~~~
main.c:9:11: error: expected expression before '%' token
    9 |    scanf(“%d¥n”, &n);
      |           ^
main.c:9:13: error: stray '\302' in program
    9 |    scanf(<U+201C>%d<U+00A5>n<U+201D>, &n);
      |                    ^~~~~~~~
main.c:9:15: error: stray '\342' in program
    9 |    scanf(<U+201C>%d<U+00A5>n<U+201D>, &n);
      |                             ^~~~~~~~
main.c:12:13: error: stray '\342' in program
   12 |       scanf(<U+201C>%d<U+00A5>n<U+201D>, &x[n]);
      |             ^~~~~~~~
main.c:12:14: error: expected expression before '%' token
   12 |       scanf(“%d¥n”, &x[n]);
      |              ^
main.c:12:16: error: stray '\302' in program
   12 |       scanf(<U+201C>%d<U+00A5>n<U+201D>, &x[n]);
      |                       ^~~~~~~~
main.c:12:18: error: stray '\342' in program
   12 |       scanf(<U+201C>%d<U+00A5>n<U+201D>, &x[n]);
      |                                ^~~~~~~~
main.c:14:23: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   14 |       for(j = 2; j <= sqrt(x[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:14:23: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   14 |       for(j = 2; j <= sqrt(x[i]); j++){
      |                       ^~~~
main.c:14:23: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:23:11: error: stray '\342' in program
   23 |    printf(<U+201C>%d<U+00A5>n<U+201D>, a);
      |           ^~~~~~~~
main.c:23:12: error: expected expression before '%' token
   23 |    printf(“%d¥n”, a);
      |            ^
main.c:23:14: error: stray '\302' in program
   23 |    printf(<U+201C>%d<U+00A5>n<U+201D>, a);
      |                     ^~~~~~~~
main.c:23:16: error: stray '\342' in program
   23 |    printf(<U+201C>%d<U+00A5>n<U+201D>, a);
      |                              ^~~~~~~~
Language: C

#include <stdio.h>

int main()
{
   int n, i;
   int j, a;
   int x[10000];

   scanf(“%d¥n”, &n);

   for(i = 0; i < n; i++){
      scanf(“%d¥n”, &x[i]);
  
      for(j = 2; j <= sqrt(x[i]); j++){
         if(x[i] % j == 0){
            break;
         }

         a = a + 1;
      }
   }

   printf(“%d¥n”, a);

   return 0;
}




Compiler output:
main.c: In function 'main':
main.c:9:10: error: stray '\342' in program
    9 |    scanf(<U+201C>%d<U+00A5>n<U+201D>, &n);
      |          ^~~~~~~~
main.c:9:11: error: expected expression before '%' token
    9 |    scanf(“%d¥n”, &n);
      |           ^
main.c:9:13: error: stray '\302' in program
    9 |    scanf(<U+201C>%d<U+00A5>n<U+201D>, &n);
      |                    ^~~~~~~~
main.c:9:15: error: stray '\342' in program
    9 |    scanf(<U+201C>%d<U+00A5>n<U+201D>, &n);
      |                             ^~~~~~~~
main.c:12:13: error: stray '\342' in program
   12 |       scanf(<U+201C>%d<U+00A5>n<U+201D>, &x[i]);
      |             ^~~~~~~~
main.c:12:14: error: expected expression before '%' token
   12 |       scanf(“%d¥n”, &x[i]);
      |              ^
main.c:12:16: error: stray '\302' in program
   12 |       scanf(<U+201C>%d<U+00A5>n<U+201D>, &x[i]);
      |                       ^~~~~~~~
main.c:12:18: error: stray '\342' in program
   12 |       scanf(<U+201C>%d<U+00A5>n<U+201D>, &x[i]);
      |                                ^~~~~~~~
main.c:14:23: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   14 |       for(j = 2; j <= sqrt(x[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:14:23: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   14 |       for(j = 2; j <= sqrt(x[i]); j++){
      |                       ^~~~
main.c:14:23: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:23:11: error: stray '\342' in program
   23 |    printf(<U+201C>%d<U+00A5>n<U+201D>, a);
      |           ^~~~~~~~
main.c:23:12: error: expected expression before '%' token
   23 |    printf(“%d¥n”, a);
      |            ^
main.c:23:14: error: stray '\302' in program
   23 |    printf(<U+201C>%d<U+00A5>n<U+201D>, a);
      |                     ^~~~~~~~
main.c:23:16: error: stray '\342' in program
   23 |    printf(<U+201C>%d<U+00A5>n<U+201D>, a);
      |                              ^~~~~~~~
Language: C

#include <stdio.h>
#define N 10000

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

int main(void) {
	int count, i , n;
	count = 0;
	scanf("%d" ,&n);
	int a[N];
	
	for(i = 0;i < n;i++){
		scanf("%d" , &a[i]);
		count = count + isPrime(a[i]);
	}
	
	printf("%d\n" , count);
	
	return 0;
}


Compiler output:
main.c: In function 'isPrime':
main.c:13:27: error: expected expression before '<' token
   13 |         for(i = 3; i * i =< x; i = i + 2);
      |                           ^
Language: C

#include <stdio.h>
#define N 10000

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

int main(void) {
	int count, i , n;
	count = 0;
	scanf("%d" ,&n);
	int a[N];
	
	for(i = 0;i < n;i++){
		scanf("%d" , &a[i]);
		count = count + isPrime(a[i]);
	}
	
	printf("%d\n" , count);
	
	return 0;
}
	


Compiler output:
main.c: In function 'isPrime':
main.c:13:27: error: expected expression before '<' token
   13 |         for(i = 3; i * i =< x; i = i + 2);
      |                           ^
Language: C

#include <stdio.h>
#define N 10000

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

int main(void) {
	int count, i , n;
	count = 0;
	scanf("%d" ,&n);
	int a[N];
	
	for(i = 0;i < n;i++){
		scanf("%d" , &a[i]);
		count = count + isPrime(a[i]);
	}
	
	printf("%d\n" , count);
	
	return 0;
}
	


Compiler output:
main.c: In function 'isPrime':
main.c:13:27: error: expected expression before '<' token
   13 |         for(i = 3; i * i =< x; i = i + 2)
      |                           ^
Language: C

#include<stdio.h>

int main(void) {

   int n, d, i;
   int c = 1;

   scanf("%d", &n);

   for (i = 3; i <= n + 1; i++) {
     for (d = 2; d <= i - 1; d++) {
       if (i % d != 0) {
         c += 1;
       }

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

   return 0;
}


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

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

int main(void){
  int n,x,i,a;
  double b;
  scanf("%d",&n);
   for(i=0;i<n;i++){
      scanf("%d",&a);
      if(a==2){
         return true;
      }
      
      else if(a<2 || a%2==0){
         return false;
      }

      b=sqrt(a);
      while(i<=b){
        if(i%x==0){
           return false;
　　　　}　
           i=i+2;
       else if(i>b){
        return tlue
      }
     }
       
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:17: error: 'true' undeclared (first use in this function)
   11 |          return true;
      |                 ^~~~
main.c:3:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<math.h>
  +++ |+#include <stdbool.h>
    3 | 
main.c:11:17: note: each undeclared identifier is reported only once for each function it appears in
   11 |          return true;
      |                 ^~~~
main.c:15:17: error: 'false' undeclared (first use in this function)
   15 |          return false;
      |                 ^~~~~
main.c:15:17: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:22:1: error: stray '\343' in program
   22 | <U+3000><U+3000><U+3000><U+3000>}<U+3000>
      | ^~~~~~~~
main.c:22:3: error: stray '\343' in program
   22 | <U+3000><U+3000><U+3000><U+3000>}<U+3000>
      |         ^~~~~~~~
main.c:22:5: error: stray '\343' in program
   22 | <U+3000><U+3000><U+3000><U+3000>}<U+3000>
      |                 ^~~~~~~~
main.c:22:7: error: stray '\343' in program
   22 | <U+3000><U+3000><U+3000><U+3000>}<U+3000>
      |                         ^~~~~~~~
main.c:22:10: error: stray '\343' in program
   22 | <U+3000><U+3000><U+3000><U+3000>}<U+3000>
      |                                  ^~~~~~~~
main.c:24:8: error: 'else' without a previous 'if'
   24 |        else if(i>b){
      |        ^~~~
main.c:25:16: error: 'tlue' undeclared (first use in this function)
   25 |         return tlue
      |                ^~~~
main.c:25:20: error: expected ';' before '}' token
   25 |         return tlue
      |                    ^
      |                    ;
   26 |       }
      |       ~             
main.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

#include<stdio.h>
int main(void)
{
  int x[512];
  

  scanf("%d",&a);
  
  for (i = 0, i < a, i++)
  {
    scanf("%d",&x[i]);
  }
  
  
  for (j = 0, j < a, j++)
  {
    for (k = 2, k < x[j], k++)
      {
        if (x[j] % k == 0)
          {
            count++;
            break;
          }
       }
  }
  printf("%d\n",count);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:15: error: 'a' undeclared (first use in this function)
    7 |   scanf("%d",&a);
      |               ^
main.c:7:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:8: error: 'i' undeclared (first use in this function)
    9 |   for (i = 0, i < a, i++)
      |        ^
main.c:9:25: error: expected ';' before ')' token
    9 |   for (i = 0, i < a, i++)
      |                         ^
      |                         ;
main.c:9:25: error: expected expression before ')' token
main.c:15:8: error: 'j' undeclared (first use in this function)
   15 |   for (j = 0, j < a, j++)
      |        ^
main.c:15:25: error: expected ';' before ')' token
   15 |   for (j = 0, j < a, j++)
      |                         ^
      |                         ;
main.c:15:25: error: expected expression before ')' token
main.c:17:10: error: 'k' undeclared (first use in this function)
   17 |     for (k = 2, k < x[j], k++)
      |          ^
main.c:17:30: error: expected ';' before ')' token
   17 |     for (k = 2, k < x[j], k++)
      |                              ^
      |                              ;
main.c:17:30: error: expected expression before ')' token
main.c:21:13: error: 'count' undeclared (first use in this function)
   21 |             count++;
      |             ^~~~~
Language: C

#include<stdio.h>

int main(void){

int a[10000],b[10000]={0},i,k,n,ans=0;

scanf("%d",&n);

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

if(a[i]%2==0)
break;
else{
for(k=2;k<a[i];k++){
 if(a[i]%k==0)
     break;
    else 
 b[i]++;
}

if(b[i]==a[i]-2)
ans++;
}

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

}




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

#include <stdio.h>

int main(){

int n[1000],count[1000],k;

k=0;

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

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

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:9:5: error: 'i' undeclared (first use in this function)
    9 | for(i=0;;i++){
      |     ^
main.c:9:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:6: error: 'j' undeclared (first use in this function)
   11 |  for(j=1;j<=n[i];j++){
      |      ^
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

#include <stdio.h>

int main(){

int n[1000],count[1000],k;

k=0;

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

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

return 0;
}



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

#include <stdio.h>

int main(){

int n[1000],count[1000],k,s;

k=0;

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

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

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

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:11:5: error: 'i' undeclared (first use in this function)
   11 | for(i=0;i<s;i++){
      |     ^
main.c:11:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:6: error: 'j' undeclared (first use in this function)
   13 |  for(j=1;j<=n[i];j++){
      |      ^
Language: C

#include <stdio.h>

int main(){

int n[1000],count[1000],k,s;

for(i=0;i<1000;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<=n[i];j++){
   if(n[i]%j == 0){
    count[i] = count[i]+1;
    }
 if(count[i]==2){
  k=k+1;
   }
  }
}

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

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:7:5: error: 'i' undeclared (first use in this function)
    7 | for(i=0;i<1000;i++){
      |     ^
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:6: error: 'j' undeclared (first use in this function)
   18 |  for(j=1;j<=n[i];j++){
      |      ^
Language: C

#include <stdio.h>

int main(){

int n[1000],count[1000],k,s;

for(i=0;i<1000;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<=n[i];j++){
   if(n[i]%j == 0){
    count[i] = count[i]+1;
    }
   }
 if(count[i]==2){
  k=k+1;
   }
}

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

return 0;
}



Compiler output:
main.c: In function 'main':
main.c:7:5: error: 'i' undeclared (first use in this function)
    7 | for(i=0;i<1000;i++){
      |     ^
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:6: error: 'j' undeclared (first use in this function)
   18 |  for(j=1;j<=n[i];j++){
      |      ^
Language: C

#include <stdio.h>

int main(){

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

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])
  for(j=1;j<=f[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:17:1: error: stray '\343' in program
   17 | <U+3000>f[i]=sqrt(n[i])
      | ^~~~~~~~
main.c:17:8: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
   17 | 　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:17:8: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
   17 | 　f[i]=sqrt(n[i])
      |        ^~~~
main.c:17:8: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:17:18: error: expected ';' before 'for'
   17 | 　f[i]=sqrt(n[i])
      |                  ^
      |                  ;
   18 |   for(j=1;j<=f[i];j++){
      |   ~~~
Language: C

#include <stdio.h>

int main(){

int n[10000],count[10000],k,s,i,j,z[10000];
double f[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++){
      |   ~~~