criyle/codenet-compile-errors huggingface dataset:
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 | }
      | ^
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=2;
    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 | }
      | ^
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 | }
      | ^
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
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]y != 0){
    count++;
    break;
 }

}

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:30:10: error: expected ')' before 'y'
   30 |   if(m[x]y != 0){
      |     ~    ^
      |          )
main.c:40:1: error: expected declaration or statement at end of input
   40 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
  int m[1000000000000000000000],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 || m[x]==3){
     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+=2;
}

  if(m[x]%y != 0){
    count++;
    break;
  }
 }
}
    printf("%d\n",count);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:9: warning: integer constant is too large for its type
    4 |   int m[1000000000000000000000],n,x,y;
      |         ^~~~~~~~~~~~~~~~~~~~~~
main.c:4:7: error: size '15503280078736850944' of array 'm' exceeds maximum object size '9223372036854775807'
    4 |   int m[1000000000000000000000],n,x,y;
      |       ^
Language: C

#include<stdio.h>
#include<math.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 = 0;
    
    judge = 0;

    for(j = 2; j <=sqrt(a[i]); j++){

      if(a[i] % j == 0)

       judge = 1;

      if(judge = 1)

       break;

       }
   
       if(judge == 0)
 
       count++;
 
   }
 
    
     printf("%d\n",count);
 
    
       return 0;

}

Compiler output:
main.c: In function 'main':
main.c:17:5: error: 'judge' undeclared (first use in this function)
   17 |     judge = 0;
      |     ^~~~~
main.c:17: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 n,i,j,count;
  int a[10000] = {0};
 
   scanf("%d",&n);
 
  for(i = 0; i < n; i++){
 
     scanf("%d",&a[i]);

  }

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

    count = 0;
    
    judge = 0;

    for(j = 2; j <=sqrt(a[i]); j++){

      if(a[i] % j == 0)

       judge = 1;

         }

      if(judge = 1)

       break;

       }
   
       if(judge == 0)
 
       count++;
 
   }
 
    
     printf("%d\n",count);
 
    
       return 0;

}

Compiler output:
main.c: In function 'main':
main.c:21:5: error: 'judge' undeclared (first use in this function)
   21 |     judge = 0;
      |     ^~~~~
main.c:21:5: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:44:13: error: expected declaration specifiers or '...' before string constant
   44 |      printf("%d\n",count);
      |             ^~~~~~
main.c:44:20: error: unknown type name 'count'
   44 |      printf("%d\n",count);
      |                    ^~~~~
main.c:47:8: error: expected identifier or '(' before 'return'
   47 |        return 0;
      |        ^~~~~~
main.c:49:1: error: expected identifier or '(' before '}' token
   49 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>
 
int main(){
 
  int n,i,j,judge,count;
  int a[10000] = {0};
 
   scanf("%d",&n);
 
  for(i = 0; i < n; i++){
 
     scanf("%d",&a[i]);

   }

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

    count = 0;
    
    judge = 0;

    for(j = 2; j <= sqrt(a[i]); j++){

      if(a[i] % j == 0)

       judge = 1;

         }

      if(judge = 1)

       break;

       }
   
       if(judge == 0)
 
       count++;
 
   }
 
    
     printf("%d\n",count);
 
    
       return 0;

}

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

#include<stdio.h>
#include<math.h>
 
int main(){
 
  int n,i,j,judge,count;
  int a[10000] = {0};
 
   scanf("%d",&n);
 
  for(i = 0; i < n; i++){
 
     scanf("%d",&a[i]);

   }

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

    count = 0;
    
    judge = 0;

    for(j = 2; j <= sqrt(a[i]); j++){

      if(a[i] % j == 0)

       judge = 1;


      if(judge = 1)

       break;

       }

   
       if(judge == 0)
 
       count++;
 
   }

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

}

Compiler output:
main.c:46:13: error: expected declaration specifiers or '...' before string constant
   46 |      printf("%d\n",count);
      |             ^~~~~~
main.c:46:20: error: unknown type name 'count'
   46 |      printf("%d\n",count);
      |                    ^~~~~
main.c:49:8: error: expected identifier or '(' before 'return'
   49 |        return 0;
      |        ^~~~~~
main.c:51:1: error: expected identifier or '(' before '}' token
   51 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>
 
int main(){
 
  int n,i,j,judge,count;
  int a[10000] = {0};
 
   scanf("%d",&n);
 
  for(i = 0; i < n; i++){
 
     scanf("%d",&a[i]);

   }

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

    count = 0;
    
    judge = 0;

    for(j = 2; j <= sqrt(a[i]); j++){

      if(a[i] % j == 0)

       judge = 1;


      if(judge = 1)

       break;

       }

  }
   
       if(judge == 0)
 
       count++;
 
   }

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

}

Compiler output:
main.c:46:13: error: expected declaration specifiers or '...' before string constant
   46 |      printf("%d\n",count);
      |             ^~~~~~
main.c:46:20: error: unknown type name 'count'
   46 |      printf("%d\n",count);
      |                    ^~~~~
main.c:49:8: error: expected identifier or '(' before 'return'
   49 |        return 0;
      |        ^~~~~~
main.c:51:1: error: expected identifier or '(' before '}' token
   51 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>
 
int main(){
 
  int n,i,j,judge,count;
  int a[10000] = {0};
 
   scanf("%d",&n);
 
  for(i = 0; i < n; i++){
 
     scanf("%d",&a[i]);

   }

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

    x = sqrt(a[i])
    
    judge = 0;

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

      if(a[i] % j == 0){

       judge = 1;

 }

      if(judge == 1){

       break;

       }

  }
   
       if(judge == 0){
      
       count = 0;
       
       count++;
 
   }

}

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

}

Compiler output:
main.c: In function 'main':
main.c:19:5: error: 'x' undeclared (first use in this function)
   19 |     x = sqrt(a[i])
      |     ^
main.c:19:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:19: error: expected ';' before 'judge'
   19 |     x = sqrt(a[i])
      |                   ^
      |                   ;
   20 | 
   21 |     judge = 0;
      |     ~~~~~
Language: C

#include<stdio.h>
#include<math.h>
 
int main(){
 
  int n,i,j,x,judge,count;
  int a[10000] = {0};
 
   scanf("%d",&n);
 
  for(i = 0; i < n; i++){
 
     scanf("%d",&a[i]);

   }

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

    x = sqrt(a[i])
    
    judge = 0;

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

      if(a[i] % j == 0){

       judge = 1;

 }

      if(judge == 1){

       break;

       }

  }
   
       if(judge == 0){
      
       count = 0;
       
       count++;
 
   }

}

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

}

Compiler output:
main.c: In function 'main':
main.c:19:19: error: expected ';' before 'judge'
   19 |     x = sqrt(a[i])
      |                   ^
      |                   ;
   20 | 
   21 |     judge = 0;
      |     ~~~~~
Language: C

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

int prime(int x)
{

int i;

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,m,i;
int a=0;

scanf("%d",&n);

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

scanf("%d",&m);

if(prime(m)==1)
{

a++;

}

}

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

return 0;

}

Compiler output:
main.c: In function 'prime':
main.c:46:15: error: 'a' undeclared (first use in this function)
   46 | printf("%d\n",a);
      |               ^
main.c:46:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int prime(int x)
{

int i;

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,m,i;
int a=0;

scanf("%d",&n);

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

scanf("%d",&m);

if(prime(m)==1)
{

a++;

}

}

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

return 0;

}

Compiler output:
main.c:46:8: error: expected declaration specifiers or '...' before string constant
   46 | printf("%d\n",a);
      |        ^~~~~~
main.c:46:15: error: unknown type name 'a'
   46 | printf("%d\n",a);
      |               ^
main.c:48:1: error: expected identifier or '(' before 'return'
   48 | return 0;
      | ^~~~~~
main.c:50:1: error: expected identifier or '(' before '}' token
   50 | }
      | ^
Language: C

#include <stdio.h>

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

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

  return 0;
}

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

#include <stdio.h>

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

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

  return 0;
}

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

#include<stdio.h>
#include<math.h>
#define MAX 10000000
int main()
{
	int i, j,n,s,ary[10000],y;
	bool a[MAX];
        double x;

	for (i = 0; i < MAX; i++) {
		a[i] = i >= 2 ? 1:0;
	}
        x=sqrt(MAX);
        y=x;
	for (i = 2; i < y; i++) {
		if (a[i]) {
			for (j = 0; i*(j + 2) < MAX; j++) {
				a[i*(j + 2)] = 0;
			}
		}
	}


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

Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool a[MAX];
      |         ^~~~
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 | #define MAX 10000000
Language: C

#include<stdio.h>
#include<math.h>
#define MAX 10000000
int main()
{
	int i, j,n,s,ary[10000],y;
	bool a[MAX];
        double x;

	for (i = 0; i < MAX; i++) {
		a[i] = i >= 2 ? 1:0;
	}
        x=sqrt(MAX);
        y=(int)x;
	for (i = 2; i < y; i++) {
		if (a[i]) {
			for (j = 0; i*(j + 2) < MAX; j++) {
				a[i*(j + 2)] = 0;
			}
		}
	}


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

Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool a[MAX];
      |         ^~~~
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 | #define MAX 10000000
Language: C

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

int main()
{
int n,x,i,m[10000];
int con;

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

if(func(m[i]) == 1)
 con++;
}
printf("%d\n",con);
return 0;
}

 int fanc(int m[])
{
int j=3;

if(m[]==2 || m[]==3)
return 1;

if(m[]<2 || m[]%2==0)
return 2;

while(j*j<=squrt(m[])){
if(m[]%j==0)
 break;

j+=2;
}

if(m[]%j != 0)
return  1;
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   13 | if(func(m[i]) == 1)
      |    ^~~~
main.c: In function 'fanc':
main.c:24:6: error: expected expression before ']' token
   24 | if(m[]==2 || m[]==3)
      |      ^
main.c:27:6: error: expected expression before ']' token
   27 | if(m[]<2 || m[]%2==0)
      |      ^
main.c:30:12: error: implicit declaration of function 'squrt'; did you mean 'sqrt'? [-Wimplicit-function-declaration]
   30 | while(j*j<=squrt(m[])){
      |            ^~~~~
      |            sqrt
main.c:30:20: error: expected expression before ']' token
   30 | while(j*j<=squrt(m[])){
      |                    ^
main.c:37:6: error: expected expression before ']' token
   37 | if(m[]%j != 0)
      |      ^
Language: C

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

int main()
{
int n,x,i,m[10000];
int con;

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

if(func(m[i]) == 1)
 con++;
}
printf("%d\n",con);
return 0;
}

 int fanc(int a)
{
int j=3;

if(a==2 || a==3)
return 1;

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

while(j*j<=squrt(a)){
if(a%j==0)
 break;

j+=2;
}

if(a%j != 0)
return  1;
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   13 | if(func(m[i]) == 1)
      |    ^~~~
main.c: In function 'fanc':
main.c:30:12: error: implicit declaration of function 'squrt'; did you mean 'sqrt'? [-Wimplicit-function-declaration]
   30 | while(j*j<=squrt(a)){
      |            ^~~~~
      |            sqrt
Language: C

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

int main()
{
int n,x,i,m[10000];
int con;

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

if(func(m[i]) == 1)
 con++;
}
printf("%d\n",con);
return 0;
}

double fanc(int a)
{
int j=3;

if(a==2 || a==3)
return 1;

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

while(j*j<=squrt(a)){
if(a%j==0)
 break;

j+=2;
}

if(a%j != 0)
return  1;
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   13 | if(func(m[i]) == 1)
      |    ^~~~
main.c: In function 'fanc':
main.c:30:12: error: implicit declaration of function 'squrt'; did you mean 'sqrt'? [-Wimplicit-function-declaration]
   30 | while(j*j<=squrt(a)){
      |            ^~~~~
      |            sqrt
Language: C

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

int main()
{
int n,x,i,m[10000];
int con;

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

if(func(m[i]) == 1)
 con++;
}
printf("%d\n",con);
return 0;
}

int fanc(int a)
{
int j=3;

if(a==2 || a==3)
return 1;

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

while(j*j<=sqrt(a)){
if(a%j==0)
 break;

j+=2;
}

if(a%j != 0)
return  1;
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   13 | if(func(m[i]) == 1)
      |    ^~~~
Language: C

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

int main()
{
int n,x,i,m[10000];
int con;

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

if(func(m[i]) == 1)
 con++;
}
printf("%d\n",con);
return 0;
}

int fanc(int a);
{
int j=3;

if(a==2 || a==3)
return 1;

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

while(j*j<=sqrt(a)){
if(a%j==0)
 break;

j+=2;
}

if(a%j != 0)
return  1;
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   13 | if(func(m[i]) == 1)
      |    ^~~~
main.c: At top level:
main.c:21:1: error: expected identifier or '(' before '{' token
   21 | {
      | ^
Language: C

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

int main()
{
int n,x,i,m[10000];
int con;

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

if(func(m[i]) == 1)
 con++;
}
printf("%d\n",con);
return 0;
}

int fanc(int a);

int j=3;

if(a==2 || a==3)
return 1;

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

while(j*j<=sqrt(a)){
if(a%j==0)
 break;

j+=2;
}

if(a%j != 0)
return  1;
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   13 | if(func(m[i]) == 1)
      |    ^~~~
main.c: At top level:
main.c:24:1: error: expected identifier or '(' before 'if'
   24 | if(a==2 || a==3)
      | ^~
main.c:27:1: error: expected identifier or '(' before 'if'
   27 | if(a<2 || a%2==0)
      | ^~
main.c:30:1: error: expected identifier or '(' before 'while'
   30 | while(j*j<=sqrt(a)){
      | ^~~~~
main.c:37:1: error: expected identifier or '(' before 'if'
   37 | if(a%j != 0)
      | ^~
main.c:39:1: error: expected identifier or '(' before '}' token
   39 | }
      | ^
Language: C

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

int main()
{
int n,x,i,m[10000];
int con;

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

if(func(m[i]) == 1)
 con++;
}
printf("%d\n",con);
return 0;
}

int fanc(int a)
{
int j=3;

if(a==2 || a==3)
return 1;

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

while(a>=sqrt(j)){
if(a%j==0)
 break;

j+=2;
}

if(a%j != 0)
return  1;
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   13 | if(func(m[i]) == 1)
      |    ^~~~
Language: C

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

int main()
{
int n,x,i,m[10000];
int con;

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

if(func(m[i]) == 1)
 con++;
}
printf("%d\n",con);
return 0;
}

int fanc(int a)
{
int j=3;

if(a==2 || a==3)
return 1;

if(a<2 || a%2==0)
return NULL;

while(a>=sqrt(j)){
if(a%j==0)
 break;

j+=2;
}

if(a%j != 0)
return  1;
}

Compiler output:
main.c: In function 'main':
main.c:13:4: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   13 | if(func(m[i]) == 1)
      |    ^~~~
main.c: In function 'fanc':
main.c:28:8: error: returning 'void *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
   28 | return NULL;
      |        ^~~~
Language: C

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

int main(void)
{
  int n, x;
  int i,j;
  int k = 0;
  int l = 0;
  int a[10000];

  scanf(???%d???, &n);

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

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

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

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:9: error: expected expression before '?' token
   12 |   scanf(???%d???, &n);
      |         ^
main.c:15:11: error: expected expression before '?' token
   15 |     scanf(???%d???, &a[i]);
      |           ^
main.c:35:10: error: expected expression before '?' token
   35 |   printf(???%d?\n???, k);
      |          ^
main.c:35:16: error: stray '\' in program
   35 |   printf(???%d?\n???, k);
      |                ^
Language: C

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

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

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

 if(func(i)){
 con++;
}
}
printf("%d\n",con);
return 0;

}

int fanc(int a){
int i;
for(i=2;i<=sqrt(a),i++){
if(a%i == 0){
break;
}
}
return 0;
}
if(a==2 || a==3)
return 1;

if(a<2 || a%2==0)
return NULL;
while(a>=sqrt(j)){
if(a%j==0)
 break;

j+=2;
}

if(a%j != 0)
return  1;
}

Compiler output:
main.c: In function 'main':
main.c:12:5: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   12 |  if(func(i)){
      |     ^~~~
main.c: In function 'fanc':
main.c:23:23: error: expected ';' before ')' token
   23 | for(i=2;i<=sqrt(a),i++){
      |                       ^
      |                       ;
main.c: At top level:
main.c:30:1: error: expected identifier or '(' before 'if'
   30 | if(a==2 || a==3)
      | ^~
main.c:33:1: error: expected identifier or '(' before 'if'
   33 | if(a<2 || a%2==0)
      | ^~
main.c:35:1: error: expected identifier or '(' before 'while'
   35 | while(a>=sqrt(j)){
      | ^~~~~
main.c:42:1: error: expected identifier or '(' before 'if'
   42 | if(a%j != 0)
      | ^~
main.c:44:1: error: expected identifier or '(' before '}' token
   44 | }
      | ^
Language: C

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

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

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

 if(func(i)){
 con++;
}
}
printf("%d\n",con);
return 0;

}

int fanc(int a){
int i;
for(i=2;i<=sqrt(a);i++){
if(a%i == 0){
break;
}
}
return 0;
}
if(a==2 || a==3)
return 1;

if(a<2 || a%2==0)
return NULL;
while(a>=sqrt(j)){
if(a%j==0)
 break;

j+=2;
}

if(a%j != 0)
return  1;
}

Compiler output:
main.c: In function 'main':
main.c:12:5: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   12 |  if(func(i)){
      |     ^~~~
main.c: At top level:
main.c:30:1: error: expected identifier or '(' before 'if'
   30 | if(a==2 || a==3)
      | ^~
main.c:33:1: error: expected identifier or '(' before 'if'
   33 | if(a<2 || a%2==0)
      | ^~
main.c:35:1: error: expected identifier or '(' before 'while'
   35 | while(a>=sqrt(j)){
      | ^~~~~
main.c:42:1: error: expected identifier or '(' before 'if'
   42 | if(a%j != 0)
      | ^~
main.c:44:1: error: expected identifier or '(' before '}' token
   44 | }
      | ^
Language: C

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

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

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

 if(func(i)){
 con++;
}
}
printf("%d\n",con);
return 0;

}

int fanc(int a){
int i;
for(i=2;i<=sqrt(a);i++){
if(a%i == 0){
break;
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:5: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   12 |  if(func(i)){
      |     ^~~~
Language: C

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

int fanc(int a){
int i;
for(i=2;i<=sqrt(a);i++){
if(a%i == 0){
break;
}
}
return 0;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i)]){
 con++;
}
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:23:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   23 |  if(func(m[i)]){
      |     ^~~~
      |     fanc
main.c:23:13: error: expected ']' before ')' token
   23 |  if(func(m[i)]){
      |             ^
      |             ]
main.c:23:14: error: expected ')' before ']' token
   23 |  if(func(m[i)]){
      |    ~         ^
      |              )
main.c:23:14: error: expected statement before ']' token
main.c:23:15: error: expected statement before ')' token
   23 |  if(func(m[i)]){
      |               ^
Language: C

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

int fanc(int a){
int i;
for(i=2;i<=sqrt(a);i++){
if(a%i == 0){
break;
}
}
return 0;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i])==0){
 con++;
}
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:23:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   23 |  if(func(m[i])==0){
      |     ^~~~
      |     fanc
Language: C

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

int fanc(int a){
int i,j;
for(i=2;i<=sqrt(a);i++){
if(a%i == 0){
j=0;
break;
}
}
return j;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i])==0){
 con++;
}
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:24:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   24 |  if(func(m[i])==0){
      |     ^~~~
      |     fanc
Language: C

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

int fanc(int a){
int i,j;
for(i=2;i<=sqrt(a);i++){
if(a%i == 0){
j=0;
break;
}
}
return j;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i])){
 con++;
}
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:24:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   24 |  if(func(m[i])){
      |     ^~~~
      |     fanc
Language: C

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

int fanc(int a){
int i,j;
for(i=2;i*i<=a;i++){
if(a%i == 0){
j=0;
break;
}
}
return j;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i])){
 con++;
}
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:24:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   24 |  if(func(m[i])){
      |     ^~~~
      |     fanc
Language: C

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

int fanc(int *a){
int i,j;
for(i=2;i*i<=*a;i++){
if(*a%i == 0){
j=0;
break;
}
}
return j;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i])){
 con++;
}
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:24:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   24 |  if(func(m[i])){
      |     ^~~~
      |     fanc
Language: C

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

double fanc(int *a)
{
int i,j;
for(i=2;i*i<=*a;i++){
if(*a%i == 0){
j=0;
break;
}
}
return j;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i])){
 con++;
}
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:25:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   25 |  if(func(m[i])){
      |     ^~~~
      |     fanc
Language: C

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

int fanc(int *a)
{
int i,j;
for(i=2;i*i<=*a;i++){
if(*a%i == 0){
j=1;
break;
}
}
return j;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i])){
 con++;
  }
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:25:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   25 |  if(func(m[i])){
      |     ^~~~
      |     fanc
Language: C

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

int fanc(int *a)
{
int i,j;
for(i=2;i*i<=*a;i++){

if(*a%i == 0){
j=0;
break;
}
}
return j;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i])==0){
 con++;
  }
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:26:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   26 |  if(func(m[i])==0){
      |     ^~~~
      |     fanc
Language: C

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

int fanc(int a)
{
int i,j=0;
for(i=2;i*i<=a;i++){

if(a%i == 0){
j=0;
break;
}
}
return j;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i])==0){
 con++;
  }
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:26:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   26 |  if(func(m[i])==0){
      |     ^~~~
      |     fanc
Language: C

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

int fanc(int a)
{
int i,j=1;
for(i=2;i*i<=a;i++){

if(a%i == 0){
j=0;
break;
}
}
return j;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i])==0){
 con++;
  }
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:26:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   26 |  if(func(m[i])==0){
      |     ^~~~
      |     fanc
Language: C

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

int fanc(int *a)
{
int i,j;
for(i=2;i*i<=*a;i++){

if(*a%i == 0){
j=0;
break;
}
}
return j;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i])){
 con++;
  }
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:26:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   26 |  if(func(m[i])){
      |     ^~~~
      |     fanc
Language: C

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

int fanc(int a)
{
int i,j;
for(i=2;i*i<=a;i++){
if(a%i == 0){
j=1;
break;
}
}
return j;
}

int main()
{
int n,x,i,m[10000];
int con=0;

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

 if(func(m[i])){
 con++;
  }
}
printf("%d\n",con);
return 0;

}

Compiler output:
main.c: In function 'main':
main.c:25:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   25 |  if(func(m[i])){
      |     ^~~~
      |     fanc
Language: C

#include<stdio.h>

int fanc(int a)
{
int i;

for(i=2;i*i<=*a;i++){
if(a%i == 0){
;
break;
}
}
return 1;
}

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

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


 if(func(m[i]))con++;
}

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

}

Compiler output:
main.c: In function 'fanc':
main.c:7:14: error: invalid type argument of unary '*' (have 'int')
    7 | for(i=2;i*i<=*a;i++){
      |              ^~
main.c: In function 'main':
main.c:26:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   26 |  if(func(m[i]))con++;
      |     ^~~~
      |     fanc
main.c:26:10: error: 'm' undeclared (first use in this function)
   26 |  if(func(m[i]))con++;
      |          ^
main.c:26:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int fanc(int a)
{
int i;


for(i=2;i*i<=a;i++){
if(a%i == 0){
break;
}
}
return 1;
}

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

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


 if(func(m[i]))con++;
}

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

}

Compiler output:
main.c: In function 'main':
main.c:26:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   26 |  if(func(m[i]))con++;
      |     ^~~~
      |     fanc
main.c:26:10: error: 'm' undeclared (first use in this function)
   26 |  if(func(m[i]))con++;
      |          ^
main.c:26:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int fanc(int a)
{
int i;


for(i=2;i*i<=a;i++){
if(a%i == 0){
break;
}
}
return 1;
}

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

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


 if(func(x))con++;
}

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

}

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

#include<stdio.h>

int fanc(int a)
{
int i;
if(a<2 ||a%2==0)
retunrn 0;
else if(a==2)
return 1;

for(i=3;i*i<=a;i+=2){
if(a%i == 0){
return 0;

}

return 1;
}

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

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

 if(func(x))
  con++;
 }
printf("%d\n",con);
return 0;
}

Compiler output:
main.c: In function 'fanc':
main.c:7:1: error: 'retunrn' undeclared (first use in this function)
    7 | retunrn 0;
      | ^~~~~~~
main.c:7:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:8: error: expected ';' before numeric constant
    7 | retunrn 0;
      |        ^~
      |        ;
main.c: In function 'main':
main.c:29:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   29 |  if(func(x))
      |     ^~~~
      |     fanc
main.c: In function 'fanc':
main.c:34:1: error: expected declaration or statement at end of input
   34 | }
      | ^
Language: C

#include<stdio.h>

int fanc(int a)
{
int i;
if(a<2 ||a%2==0)
return 0;
else if(a==2)
return 1;

for(i=3;i*i<=a;i+=2){
if(a%i == 0){
return 0;

}

return 1;
}

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

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

 if(func(x))
  con++;
 }
printf("%d\n",con);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:29:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   29 |  if(func(x))
      |     ^~~~
      |     fanc
main.c: In function 'fanc':
main.c:34:1: error: expected declaration or statement at end of input
   34 | }
      | ^
Language: C

#include<stdio.h>

int fanc(int a)
{
int i;
if(a<2 ||a%2==0)
return 0;
else if(a==2)
return 1;

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

return 1;
}

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

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

 if(func(x))
  con++;
 }
printf("%d\n",con);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:28:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   28 |  if(func(x))
      |     ^~~~
      |     fanc
Language: C

#include<stdio.h>

int fanc(int a)
{
int i;
if(a<2 || a%2==0)
return 0;

else if(a==2)
return 1;

for(i=3;i*i<=a;i=i+2){

if(a%i == 0)
return 0;
}

return 1;
}

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

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

 if(func(x))
  con++;
 }
printf("%d\n",con);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:30:5: error: implicit declaration of function 'func'; did you mean 'fanc'? [-Wimplicit-function-declaration]
   30 |  if(func(x))
      |     ^~~~
      |     fanc
Language: C

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

int main(void)
{
  int n, x;
  int i,j,l;
  int m = 0;
  int k = 0;
  int a[10000];

  scanf("%d", &n);

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

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

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

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

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:19: error: expected ';' before 'for'
   24 |     l = sqrt(a[i])
      |                   ^
      |                   ;
   25 |     for(j = 3; j < l; j += 2) {
      |     ~~~            
main.c: At top level:
main.c:35:10: error: expected declaration specifiers or '...' before string constant
   35 |   printf("%d?\n", k);
      |          ^~~~~~~
main.c:35:19: error: unknown type name 'k'
   35 |   printf("%d?\n", k);
      |                   ^
main.c:37:3: error: expected identifier or '(' before 'return'
   37 |   return 0;
      |   ^~~~~~
main.c:38:1: error: expected identifier or '(' before '}' token
   38 | }
      | ^
Language: C

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

int main(void)
{
  int n, x;
  int i,j,l;
  int m = 0;
  int k = 0;
  int a[10000];

  scanf("%d", &n);

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

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

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

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

  return 0;
}

Compiler output:
main.c:35:10: error: expected declaration specifiers or '...' before string constant
   35 |   printf("%d?\n", k);
      |          ^~~~~~~
main.c:35:19: error: unknown type name 'k'
   35 |   printf("%d?\n", k);
      |                   ^
main.c:37:3: error: expected identifier or '(' before 'return'
   37 |   return 0;
      |   ^~~~~~
main.c:38:1: error: expected identifier or '(' before '}' token
   38 | }
      | ^
Language: C

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

int main(void)
{
  int n, x;
  int i,j,l;
  int m = 0;
  int k = 0;
  int a[10000];

  scanf("%d", &n);

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

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

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

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

  return 0;
}

Compiler output:
main.c:36:10: error: expected declaration specifiers or '...' before string constant
   36 |   printf("%d?\n", k);
      |          ^~~~~~~
main.c:36:19: error: unknown type name 'k'
   36 |   printf("%d?\n", k);
      |                   ^
main.c:38:3: error: expected identifier or '(' before 'return'
   38 |   return 0;
      |   ^~~~~~
main.c:39:1: error: expected identifier or '(' before '}' token
   39 | }
      | ^
Language: C

#include<stdio.h>

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

if(a%i == 0)
return 0;
}
return 1;
}

int main()
{
int n,x[10000],i;
int count=0;

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

Compiler output:
main.c: In function 'main':
main.c:24:5: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   24 |  if(func(x[i]))count++;
      |     ^~~~
Language: C

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

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

int main()
{
int n,x[10000],i;
int count=0;

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

 if(isPrime(x[i])==1)count++;
}
printf("%d\n",count);
return 0;
}

Compiler output:
main.c: In function 'isPrime':
main.c:13:5: error: expected ';' before '}' token
   13 | i+=2
      |     ^
      |     ;
   14 | }
      | ~    
main.c: At top level:
main.c:15:1: error: expected identifier or '(' before 'return'
   15 | return 1;
      | ^~~~~~
main.c:16:1: error: expected identifier or '(' before '}' token
   16 | }
      | ^
Language: C

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

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

int main()
{
int n,x[10000],i;
int count=0;

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

 if(isPrime(x[i])==1)count++;
}
printf("%d\n",count);
return 0;
}

Compiler output:
main.c: In function 'isPrime':
main.c:13:5: error: expected ';' before '}' token
   13 | i+=2
      |     ^
      |     ;
   14 | }
      | ~
Language: C

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

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

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

Compiler output:
main.c: In function 'isPrime':
main.c:8:6: error: 'a' undeclared (first use in this function)
    8 |   if(a==2)
      |      ^
main.c:8:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

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

  scanf("%d",&n);

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

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

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

  return 0;
} 

  

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

#include <stdio.h>

int isPrime(int x){
	int i;
	if ( x == 2 ){
		return 1;
	}
	else if ( x <= 1 || x % 2 == 0 ){
		return 0;
		
		for( i = 3 ; i * i <= x ; i+=2 ){
			if( x % i == 0 ){
				return 0;
			}
			return 1;
		}
		
	int main(void){
		int n,x,i;
		int ans = 0;
		
		scanf("%d",&n);
		for( i = 0 ; i < n ; i++ ){
			scanf("%d",&x);
			if ( isPrime(x) ){
				ans = ans + 1 ;
			}
			printf("%d\n",ans);
			
			return 0;
			
		}
		

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

#include <stdio.h>

int isPrime(int x){
	int i;
	if ( x == 2 ){
		return 1;
	}
	else if ( x <= 1 || x % 2 == 0 ){
		return 0;
		
		for( i = 3 ; i * i <= x ; i+=2 ){
			if( x % i == 0 ){
				return 0;
			}
			return 1;
		}
		
	int main(void){
		int n,x,i;
		int ans = 0;
		
		scanf("%d",&n);
		for( i = 0 ; i < n ; i++ ){
			scanf("%d",&x);
			if ( isPrime(x) ){
				ans = ans + 1 ;
			}
			printf("%d\n",ans);
			}
			return 0;
			
		}
		

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

#include <stdio.h>

int isPrime(int x){
	int i;
	if ( x == 2 ){
		return 1;
	}
	else if ( x <= 1 || x % 2 == 0 ){
		return 0;
		
		for( i = 3 ; i * i <= x ; i+=2 ){
			if( x % i == 0 ){
				return 0;
			}
                }
			return 1;
		}
		
	int main(void){
		int n,x,i;
		int ans = 0;
		
		scanf("%d",&n);
		for( i = 0 ; i < n ; i++ ){
			scanf("%d",&x);
			if ( isPrime(x) ){
				ans = ans + 1 ;
			}
                }
			printf("%d\n",ans);
			
			return 0;
			
		}
		

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

#include <stdio.h>

int isPrime(int x){
	int i;
	if ( x == 2 ){
		return 1;
	}
	else if ( x <= 1 || x % 2 == 0 ){
		return 0;
		
		for( i = 3 ; i * i <= x ; i+=2 ){
			if( x % i == 0 ){
				return 0;
			}
                }
			return 1;
		}
		
	int main(void){
		int n,x,i;
		int ans = 0;
		
		scanf("%d",&n);
		for( i = 0 ; i < n ; i++ ){
			scanf("%d",&x);
			if ( isPrime(x) ){
				ans = ans + 1 ;
			}
               
			printf("%d\n",ans);
			
			return 0;
			
		}
		

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

#include <stdio.h>

int isPrime(int x){
	int i;
	if ( x == 2 ){
		return 1;
	}
	else if ( x <= 1 || x % 2 == 0 ){
		return 0;
		
		for( i = 3 ; i * i <= x ; i+=2 ){
			if( x % i == 0 ){
				return 0;
			}
                }
			return 1;
		}
		
	int main(void){
		int n,x,i;
		int ans = 0;
		
		scanf("%d",&n);
		for( i = 0 ; i < n ; i++ ){
			scanf("%d",&x);
			if ( isPrime(x) ){
				ans = ans + 1 ;
			}
               }
			printf("%d\n",ans);
			
			return 0;
			
		}
		

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

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

int main(){

  int n, t, count, i, j;
  int m[10000];

  scanf("%d",&n);

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

  for (i = 0; i < n; i++){
    if(num[i] == 2){
      count++;
    }
    else{
      t = sqrt(num[i]);
    
      for(j=3; j<=t; j++){
        if(num[i] % j == 0){
          count++;    
        }
      }  
    }
  }

  printf("%d",count);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:17: error: 'num' undeclared (first use in this function)
   12 |     scanf("%d",&num[i]);
      |                 ^~~
main.c:12:17: 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, t, count, i, j;
  int num[10000];

  scanf("%d",&n);

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

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

    while(1){

    if (num[i] == 2) {
      count++;
      break;
    }

    if(num[i] % 2 == 0){
      break;
    }

    else{
      t = sqrt(num[i]);
      for(j=3; j<=t; j=j+2){
        if(num[i] % j != 0){
          count++;    
        }
      }  
    break;
    }
  }

  printf("%d",count);

  return 0;
}

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

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

int main(){

  int n, t, count, i, j;
  int num[10000];

  scanf("%d",&n);

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

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

    while(1){

    if (num[i] == 2) {
      count++;
      break;
    }

    if(num[i] % 2 == 0){
      break;
    }

    else{
      t = sqrt(num[i]);
      for(j=3; j<=t; j=j+2){
        if(num[i] % j != 0){
          count++;    
        }
      }  
    }
  }

  printf("%d",count);

  return 0;
}

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