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

#include <stdio.h>

const int MAX_V = 1000000;
int prime[MAX_V+1];

void init(){
    int i, k, v;
    for(i=2; i<=MAX_V; i++){
        prime[i] = 1;
    }
    for(i=2; i*i<=MAX_V; i++){
        if(prime[i]){
            for(k=2*i; k<=MAX_V; k+=i){
                prime[k]=0;
            }
        }
    }   
}

int isprime(int n){
    return prime[n];
}

int main(){
    init();
    int num;
    while(scanf("%d", &num) != EOF){
        int count=0;
        for(int i=2; i<=num; i++){
            if(isprime(i)==1)
                count++;
        }
    printf("%d\n", count);
    }
    return 0;
}

Compiler output:
main.c:4:5: error: variably modified 'prime' at file scope
    4 | int prime[MAX_V+1];
      |     ^~~~~
Language: C

#include <stdio.h>

int main(){
  int n, i, j;
  int prime[10001] = {0};
  int cnt[10002] = {0};
  for(i = 2; i <= 10000; i++) {
    prime[i] = 1;
  }
  for(i = 2; i*i <= 10000; i++) {
    if(prime[i]) {
      for(j = 2 * i; j <= 10000; j += i) {
        prime[j] = 0;
      }
    }
  }
  for(i=0; i <= 10001; i++){
    cnt[i+1] = cnt[i] + a[i];
  }
  while(scanf("%d", &n) != EOF){
    printf("%d\n", cnt[n]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:25: error: 'a' undeclared (first use in this function)
   18 |     cnt[i+1] = cnt[i] + a[i];
      |                         ^
main.c:18:25: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#define MAX_V 1000000
int prime[MAX_V + 1];
int sum[MAX_V + 1];
int main(){
  int n, i, k;
  prime[0]=prime[1]=0;
  for(i = 2;i <= MAX_V;i++){
    prime[i] = 1;
  }
  for(i=2;i*i<=MAX_V;i++){
    if(prime[i]){
      for(k = 2*i;k <= MAX_V;k += i){
        prime[k] = 0;
      }
    }
  }
  sum[0] = 0;
  for(i = 0;i < MAX_V;i++){
    sum[i+1] = sum[i]+prime[i+1];
  }
  while(scanf("%d", &n) == 1){
    printf("%d\n", sum[n]);
  }
  printf("count = %d\n", count);
  return 0;
}

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

#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<cstring>
#include<vector>
#include<stack>
#include<queue>
using namespace std;
#define up(i,j,k) for(int i=j;i<k;i++)
#define uup(i,j,k) for(int i=j;i>=k;i--)
#define mem(i,j) memset(i,j,sizeof i)
#define ll long long
#define mod(x) (x)%mod
#define sfi(i) scanf("%d",&i)
#define sfs(i) scanf("%s",i)
#define sfc(i) scanf("%c",&i)
#define sfd(i) scanf("%lf",&i)
#define sff(i) scanf("%f",&i)
#define sfl(i) scanf("%lld",&i)
#define whatis(i) cout<<"This is:"<<i<<endl;
#define setflag() cout<<"This is a flag!"<<endl;

const int N = 1e6 + 5;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const double PI = acos(-1.0);
const int MAX = 1e6 + 5;

int arr[MAX];
bool vis[MAX];
void Init_Prim()
{
	arr[1] = 0;
	up(i, 2, 1000000)
	{
		if (!vis[i])
		{
			arr[i] = arr[i - 1] + 1;
			for (ll j = i; (ll)j*i <= 1000000;j++)
			{
				if (!vis[i*j])
					vis[i*j] = true;
				else
					break;
			}
		}
		else
		arr[i] = arr[i - 1];
	}
}

int main()
{
	Init_Prim();
	int n;
	while (~sfi(n))
	{
		printf("%d\n", arr[n]);
	}
	return 0;
}


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

#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <string>
#include <iostream>
#include <queue>
#include <stack>
#include <sstream>

#define ll long long
#define fre freopen("data.in", "r", stdin); freopen("data.out", "w", stdout)

using namespace std;

bool vis[1000000] = {false};
int res[1000000] = {0};

int main(int argc, char const *argv[])
{
    for (int i = 2; i < 1000000; ++i) {
        if (!vis[i]) res[i] = res[i - 1] + 1;
        else res[i] = res[i - 1];
        if (i > 1000) continue;
        for (int j = i * i; j < 1000000; j += i) {
            vis[j] = true;
        }
    }
    int n;
    while (scanf("%d", &n) != EOF) {
        printf("%d\n", res[n]);
    }
    return 0;
}


Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C

#include<iostream>
#include<cmath>
using namespace std;
int jj[1000000];
int jud(int n){
	int i;
	for (i=2;i<=sqrt(n);i++)
	if (n%i==0)
	return 0;
	return 1;
}
int main(){
	int n,i,j,res;
	while (cin>>n){
		res=0;
		for (i=0;i<1000000;i++)
		jj[i]=1;
		for (i=2;i<=n;i++){
			if (jj[i]){
				if(jud(i)){
					res++;
					for (j=i*i;j<1000000;j+=i)
					jj[j]=0;
				}
			}
		}
		cout<<res<<endl;
	}
	return 0;
}
		


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

#include<iostream>
using namespace std;
int a[1000000];
void prime()
{
    int i;
    for(i=0;i<1000000;i++)
        a[i]=1;
    for(i=2;i<1000;i++)   //一定被最小素数因子消去；
    {
        if(a[i])
        {
            for(int j=i*i;j<1000000;j+=i)
                a[j]=0;
        }
    }
    a[1]=0;
    for(i=2;i<1000000;i++)
        a[i]=a[i-1]+a[i];    //a[i]表示到当前数时素数的个数；
}
int main()
{
    int n;
    prime();
    while(cin>>n)
    {
        cout<<a[n]<<endl;
    }
    return 0;
}


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

#include<stdio.h>
#define MAX 999999
int isPrime(int n)
int main(void){
  int a,i;
  int prime[MAX];
  for(i=0;i<=MAX;i++)
    prime[i]=isPrime(i);
  for(i=1;i<MAX;i++)
    prime[i]+=prime[i-1];
  while(scanf("%d",&a)!=EOF){
    printf("%d\n",prime[a]);
  }
  return 0;
}

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


Compiler output:
main.c: In function 'isPrime':
main.c:4:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    4 | int main(void){
      |               ^
main.c:17:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   17 | int isPrime(int n){
      |                   ^
main.c:26: error: expected '{' at end of input
Language: C

#include <iostream>
using namespace std;

bool IsPrime(int x) {
  return true;  /* ダミー: 全て素数と判定 */
}

int main(void){
   int count = 0, n;
   cin >> n; /* n個整数を読む */
   for(int i = 0; i < n; i++) {
       int p;
       cin >> p;
       if(IsPrime(p)) {
         bool IsPrime(int n) {
    for(int i = 2; i*i <= n; i++) {
        if(n % i == 0) {
            return false;
        }
    }
    return true;
}


       }
   }
   cout << count << endl;
   return 0;
}




Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<cmath>
#include<stack>
#include<vector>
#include<queue>
#include<set>
using namespace std;
#define N 1000000
typedef long long ll;
int a[N],isprime[N],sum[N];
void prime()
{
    int k=0;
    memset(isprime,0,sizeof(isprime));
    for(int i=2; i<N; i++)
    {
        if(!isprime[i])
            a[k++]=i;
        for(int j=0; j<k&&i*a[j]<N; j++)
        {
            isprime[i*a[j]]=1;
            if(i%a[j]==0)
                break;
        }
    }
}
int main()
{
    prime();
    memset(sum,0,sizeof(sum));
    for(int i=2;i<N;i++){
        sum[i]=sum[i-1];
        if(!isprime[i])
            sum[i]++;
    }
    int n;
    while(scanf("%d",&n)!=EOF){
    printf("%d\n",sum[n]);
    }
    return 0;
}




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

#include <math.h>
#include <stdio.h>
int primenumber(int);
int main(){
    int a[200],t[200],i,j;
    for(i=0;scanf("%d",&a[i]) != EOF;i++){
        t[i] = 0;
        while(a[i] > 1){
            if(primenumber(a[i]) == 1){
                t[i] = t[i]+1;
            }
            a[i]--;
        }
    }
    for(j = 0;j < i;j++){
        printf("%d\n",t[j]);
    }
    return 0;
}
int primenumber(int num){
    if(num == 2) return 1;
    if(num % 2 == 0) return 0;
    for(int k = 2;k < i;k++){
        if(num % k == 0){
            return 0;
        }
    }
    return 1;
}


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

#include <math.h>
#include <stdio.h>
int primenumber(int);
int main(){
    int a[200],t[200],i,j;
    for(i=0;scanf("%d",&a[i]) != EOF;i++){
        t[i] = 0;
        while(a[i] > 1){
            if(primenumber(a[i]) == 1){
                t[i] = t[i]+1;
            }
            a[i]--;
        }
    }
    for(j = 0;j < i;j++){
        printf("%d\n",t[j]);
    }
	getch();
    return 0;
}
int primenumber(int num){
    if(num == 2) return 1;
    if(num % 2 == 0) return 0;
    for(int k = 2;k < i;k++){
        if(num % k == 0){
            return 0;
        }
    }
    return 1;
}


Compiler output:
main.c: In function 'main':
main.c:18:9: error: implicit declaration of function 'getch'; did you mean 'getc'? [-Wimplicit-function-declaration]
   18 |         getch();
      |         ^~~~~
      |         getc
main.c: In function 'primenumber':
main.c:24:23: error: 'i' undeclared (first use in this function)
   24 |     for(int k = 2;k < i;k++){
      |                       ^
main.c:24:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main()
{
 int a,b,r,ans,a1,b1;
 double c;
 while(scanf("%d %d",&a,&b)!=EOF){
 a1=a,b1=b; while(1){
 r=a%b;
 if(r==0){
 ans=b;
 break;
 }else{
 a=b; b=r; }
 }
 c=(double)(a1)*(double)(b1)/(double)(ans);
 printf("%d %.0f\n",ans,c);
 }
 return 0; } 
}



Compiler output:
main.c:19:1: error: expected identifier or '(' before '}' token
   19 | }
      | ^
Language: C

#include <stdio.h> 
int main() 
{ 
  int n ,i, j; 
  while(scanf("%d",&n);!=EOF){
  int count=0;
  int flag;
  for( i=2;i<=n;++i ) { 
    flag = 0; 
    for( j=2;j<i;++j ){ 
      if( i%j==0 ) { 
        flag = 1; 
        break; 
      } 
    } 
    if( flag==0 ) 
      count++; 
  } 
  printf("%d",count);
}
  return 0; 
} 


Compiler output:
main.c: In function 'main':
main.c:5:23: error: expected ')' before ';' token
    5 |   while(scanf("%d",&n);!=EOF){
      |        ~              ^
      |                       )
Language: C

#include <stdio.h> 
int main() 
{ 
  int n ,i, j; 
  while(scanf("%d",&n);!=EOF){
  int count=0;
  int flag;
  for( i=2;i<=n;++i ) { 
    flag = 0; 
    for( j=2;j<i;++j ){ 
      if( i%j==0 ) { 
        flag = 1; 
        break; 
      } 
    } 
    if( flag==0 ) 
      count++; 
  } 
  printf("%d",count);
}}
  return 0; 
} 


Compiler output:
main.c: In function 'main':
main.c:5:23: error: expected ')' before ';' token
    5 |   while(scanf("%d",&n);!=EOF){
      |        ~              ^
      |                       )
main.c: At top level:
main.c:21:3: error: expected identifier or '(' before 'return'
   21 |   return 0;
      |   ^~~~~~
main.c:22:1: error: expected identifier or '(' before '}' token
   22 | }
      | ^
Language: C

include<stdio.h>

int main(void){
  int p[1000000],n,count;
  while(scanf("%d",&n)!=EOF){
   
    for(int i=0;i<=n;i++)p[i]=0;
    count=0;
    for(int i=2;i<=n;i++){
      if(p[i]==0){
    count++;
    for(int j=1;i*j<=n;j++){
      p[i*j]=1;
    }      
      }
    }
 
 
    printf("%d\n",count);
  }
return 0;
}


Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

#include <stdio.h>
#include <math.h>
unsigned long long calc_pow(int a, unsigned k, unsigned n);
int suspect(int b, unsigned n);
int prime_test(unsigned n);
int main(){
  unsigned int n,i,c;

  while (scanf("%d",&n) != EOF){
    c = 0;
    for(i=1;i <= n;i++){
      if(Prime(i) == 1) c++;
    }
    printf("%d\n",c);
  }
  return 0;
}

unsigned long long calc_pow(int a, unsigned k, unsigned n)
{
  unsigned long long p;
  unsigned bit;

  p = 1;
  for (bit = 0x80000000U; bit > 0; bit >>= 1) {
    if (p > 1) p = (p*p) % n;
    if (k & bit) p = (p*a) % n;
  }
  return p;
}

int suspect(int b, unsigned n)
{
  unsigned i;
  unsigned t, u;
  unsigned long long x0, x1;

  u = n-1;
  t = 0;
  while ((u & 1) == 0) {
    t++;
    u >>= 1;
  }
  x0 = calc_pow(b, u, n);
  for (i = 1; i <= t; i++) {
    x1 = (x0*x0) % n;
    if (x1 == 1 && x0 != 1 && x0 != n-1) return 0;
    x0 = x1;
  }
  return x1 == 1;
}

int prime_test(unsigned n)
{
  if (n <= 1) return 0;          /* 0, 1 */
  if (n == 2) return 1;          /* 2 */
  if (n == 3) return 1;          /* 3 */
  if ((n & 1) == 0) return 0;  /* other even integers */

  if (n <= 1000000) {
    if (!suspect(2, n)) return 0;
    if (!suspect(3, n)) return 0;
  } else {
    if (!suspect(2, n)) return 0;
    if (!suspect(7, n)) return 0;
    if (!suspect(61, n)) return 0;
  }
  return 1;
}

Compiler output:
main.c: In function 'main':
main.c:12:10: error: implicit declaration of function 'Prime' [-Wimplicit-function-declaration]
   12 |       if(Prime(i) == 1) c++;
      |          ^~~~~
Language: C

#include <stdio.h>

int main(){
  int n,i,j,f,c,p[168];

  while (scanf("%d",&n) != EOF){
    c = 0;
    p[c++] = 2;
    p[c++] = 3;
    for(i=5;i<=n;i += 2){
      f = 0;
     for(j = 1;p[j]*p[j] <= i;j++){
       if(i % prime[j] == 0){f = 1;break;}
     }
     if(!f) p[c++] = i;
    }
    printf("%d\n",c);
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:15: error: 'prime' undeclared (first use in this function)
   13 |        if(i % prime[j] == 0){f = 1;break;}
      |               ^~~~~
main.c:13:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(){
  int n,i,j,f,c,p[168];

  while(scanf("%d",&n)){
    if(n == 1) printf("0\n");
    else if(n == 2)ツ　printf("1\n");
    else{
    c = 0;
    p[c++] = 2;
    p[c++] = 3;
    for(i=5;i<=n;i += 2){
      f = 0;
     for(j = 1;p[j]*p[j] <= i;j++){
       if(i % p[j] == 0){f = 1;break;}
     }
      if(f==0){c++;if(i <= 1000) p[c-1] = i;}
    }
    printf("%d\n",c);
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:22: error: stray '\343' in program
    8 |     else if(n == 2)<U+30C4><U+3000>printf("1\n");
      |                            ^~~~~~~~
main.c:8:20: error: '\U000030c4' undeclared (first use in this function)
    8 |     else if(n == 2)ツ　printf("1\n");
      |                    ^~
main.c:8:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:22: error: expected ';' before 'printf'
    8 |     else if(n == 2)ツ　printf("1\n");
      |                      ^ ~~~~~~
      |                      ;
Language: C

#include <stdio.h>

int main(){
  int n,i,j,f,c,p[168];

  while(scanf("%d",&n) != EOF){
    if(n == 1) printf("0\n");
    else if(n == 2)ツ　printf("1\n");
    else{
    c = 0;
    p[c++] = 2;
    p[c++] = 3;
    for(i=5;i<=n;i += 2){
      f = 0;
     for(j = 1;p[j]*p[j] <= i;j++){
       if(i % p[j] == 0){f = 1;break;}
     }
      if(f==0){c++;if(i <= 1000) p[c-1] = i;}
    }
    printf("%d\n",c);
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:22: error: stray '\343' in program
    8 |     else if(n == 2)<U+30C4><U+3000>printf("1\n");
      |                            ^~~~~~~~
main.c:8:20: error: '\U000030c4' undeclared (first use in this function)
    8 |     else if(n == 2)ツ　printf("1\n");
      |                    ^~
main.c:8:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:22: error: expected ';' before 'printf'
    8 |     else if(n == 2)ツ　printf("1\n");
      |                      ^ ~~~~~~
      |                      ;
Language: C

#include<stdio.h>
#include<math.h>
#define MAX 1000000
int main(){
int p[MAX],a,k=0; 
memset(p, 1, sizeof(p));
p[0] = 0;
  p[1] = 0;
  for (int i=2; i<sqrt(MAX)+1; i++)
    if (p[i])
      for (int j=i*2; j<MAX; j+=i)
        p[j] = 0;
scanf("%d",&a);
while(a>p[k++]){
}
printf("%d\n",k-1);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:1: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
    6 | memset(p, 1, sizeof(p));
      | ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'memset'
    2 | #include<math.h>
  +++ |+#include <string.h>
    3 | #define MAX 1000000
main.c:6:1: warning: incompatible implicit declaration of built-in function 'memset' [-Wbuiltin-declaration-mismatch]
    6 | memset(p, 1, sizeof(p));
      | ^~~~~~
main.c:6:1: note: include '<string.h>' or provide a declaration of 'memset'
Language: C

#include<stdio.h>
#include<math.h>
#define MAX 1000000
int main(){
int p[MAX],a,k=0; 
memset(p, 1, sizeof(p));
p[0] = 0;
  p[1] = 0;
  for(int i=2; i<sqrt(MAX)+1; i++)
    if (p[i])
      for(int j=i*2; j<MAX; j+=i)
        p[j] = 0;
scanf("%d",&a);
while(a>p[k++]){
}
printf("%d\n",k-1);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:1: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
    6 | memset(p, 1, sizeof(p));
      | ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'memset'
    2 | #include<math.h>
  +++ |+#include <string.h>
    3 | #define MAX 1000000
main.c:6:1: warning: incompatible implicit declaration of built-in function 'memset' [-Wbuiltin-declaration-mismatch]
    6 | memset(p, 1, sizeof(p));
      | ^~~~~~
main.c:6:1: note: include '<string.h>' or provide a declaration of 'memset'
Language: C

#define z 1000000 main(){int a[z]={},b[z]={},n,i,x=0,c;for(i=2;i<z;i++)a[i]=i;for(i=0;i<z;i++)if(a[i]!=0){b[x++]=i;for(c=i;c<z;c+=i)a[c]=0;}while(scanf("%d",&n)!=-1){c=0;while(b[c]<=n && b[c]!=0){c++;}printf("%d\n",c);}return 0;}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

ain(){
  int i,j=2,k=0,n,r,s[78499];
  s[k++]=j++;
  for(;j<999984;j+=2){
    r=(int)sqrt(j)+1;
    for(i=3;i<r;i+=2)
      if(j%i==0){
	r=0;
	break;
      }
    if(r)
      s[k++]=j;
  }
  s[78498]=1000000;
  while(scanf("%d",&n)!=-1){
    for(i=0;s[i]<=n;i++);
    printf("%d\n",i);
  }
  return 0;
}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | ain(){
      | ^~~
main.c: In function 'ain':
main.c:5:12: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
    5 |     r=(int)sqrt(j)+1;
      |            ^~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'sqrt'
  +++ |+#include <math.h>
    1 | ain(){
main.c:5:12: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
    5 |     r=(int)sqrt(j)+1;
      |            ^~~~
main.c:5:12: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:15:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   15 |   while(scanf("%d",&n)!=-1){
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | ain(){
main.c:15:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   15 |   while(scanf("%d",&n)!=-1){
      |         ^~~~~
main.c:15:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:17:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   17 |     printf("%d\n",i);
      |     ^~~~~~
main.c:17:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:17:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

include<stdio.h>
main(){
  int n,i,l,sum,a;
  while(scanf("%d",&n)!=EOF){
    a=0;
    for(i=2;i<=n;i++){
      sum=0;
      for(l=2;l<=n;l++){
	if(i%l==0){
	  sum++;
	}
      }
      if(sum==1){
	a++;
      }
    }

    printf("%d",a);
  }
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

#include<stdio.h>

int main(void){
	int n, i, pn=0, su=0;
	
	while(scanf("%d", &n); != EOF){
		
		while(n>2){
			for(i=2;i<n;i++){
				if((n%i)==0){
					su++;
				}
			}
			if(su==0){
				pn++;
			}
			n--;
			su = 0;
		}
	
		if(n>=2){
			pn++;
		}
	
		printf("%d\n",pn);
	}
	
	return 0;
	
}

Compiler output:
main.c: In function 'main':
main.c:6:30: error: expected ')' before ';' token
    6 |         while(scanf("%d", &n); != EOF){
      |              ~               ^
      |                              )
Language: C

#include<stdio.h>
#define MAX_N 1000000

int main(void){
	int prime[MAX_N];
	int n,p,i,j;
	bool is_prime[MAX_N+1];

	scanf("%d",&n);
	
	p=0;
	
	for(i=0;i<n;i++){
		is_prime[i]=true;	//f»èzñÌú»
	}
	
	is_prime[0]=is_prime[1]=false;	//0Æ1ÍfÅÍÈ¢ÌÅ\ßæè­
	
	for(i=2;i<=n;i++){
		if(is_prime[i]){
			prime[p++]=i;
			for(j=2*i;j<=n;j=j+i){
				is_prime[j]=false;
			}
		}
	}
	printf("%d\n",p);
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool is_prime[MAX_N+1];
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | #define MAX_N 1000000
main.c:14:29: error: 'true' undeclared (first use in this function)
   14 |                 is_prime[i]=true;       //f»èzñÌú»
      |                             ^~~~
main.c:14:29: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:14:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:33: error: 'false' undeclared (first use in this function)
   17 |         is_prime[0]=is_prime[1]=false;  //0Æ1ÍfÅÍÈ¢ÌÅ\ßæè­
      |                                 ^~~~~
main.c:17:33: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include<stdio.h>
#define MAX_N 100000

int main(void){
	int prime[MAX_N];
	int n,p,i,j;
	bool is_prime[MAX_N+1];

	scanf("%d",&n);
	
	p=0;
	
	for(i=0;i<n;i++){
		is_prime[i]=true;	//f»èzñÌú»
	}
	
	is_prime[0]=is_prime[1]=false;	//0Æ1ÍfÅÍÈ¢ÌÅ\ßæè­
	
	for(i=2;i<=n;i++){
		if(is_prime[i]){
			prime[p++]=i;
			for(j=2*i;j<=n;j=j+i){
				is_prime[j]=false;
			}
		}
	}
	printf("%d\n",p);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool is_prime[MAX_N+1];
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | #define MAX_N 100000
main.c:14:29: error: 'true' undeclared (first use in this function)
   14 |                 is_prime[i]=true;       //f»èzñÌú»
      |                             ^~~~
main.c:14:29: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:14:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:33: error: 'false' undeclared (first use in this function)
   17 |         is_prime[0]=is_prime[1]=false;  //0Æ1ÍfÅÍÈ¢ÌÅ\ßæè­
      |                                 ^~~~~
main.c:17:33: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include<stdio.h>
#define MAX_N 100000

int main(void){
	int prime[MAX_N];
	int n,p,i,j;
	bool is_prime[MAX_N+1];

	while(scanf("%d",&n)!=EOF){
	
		p=0;
	
		for(i=0;i<n;i++){
			is_prime[i]=true;	//f»èzñÌú»
		}
	
		is_prime[0]=is_prime[1]=false;	//0Æ1ÍfÅÍÈ¢ÌÅ\ßæè­
	
		for(i=2;i<=n;i++){
			if(is_prime[i]){
				prime[p++]=i;
				for(j=2*i;j<=n;j=j+i){
					is_prime[j]=false;
				}
			}
		}
		printf("%d\n",p);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool is_prime[MAX_N+1];
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | #define MAX_N 100000
main.c:14:37: error: 'true' undeclared (first use in this function)
   14 |                         is_prime[i]=true;       //f»èzñÌú»
      |                                     ^~~~
main.c:14:37: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:14:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:41: error: 'false' undeclared (first use in this function)
   17 |                 is_prime[0]=is_prime[1]=false;  //0Æ1ÍfÅÍÈ¢ÌÅ\ßæè­
      |                                         ^~~~~
main.c:17:41: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include<stdio.h>
#include<math.h>
 
int main(){
	int a[80000],n,i,j,ans=0,temp=0;
	a[0]=2;
	while(scanf("%d",&n)!=EOF){
		if (a[n-1] > n){
			for(int i=0; ; i++){
				if(a[i] > n){
					ans = i;
					break;
				}
			}
		}else{
			temp=0
			for(i=a[num-1]+1 ; i<=n ; i++){           
				for (j=0 ; a[j]*a[j] <= i ; j++){
					if(i % a[j] == 0){
						temp=1;
						break;
					}
				}
				if(temp==1){
					a[ans] = i;
					ans++;
				}
			}
    	}
		printf("%dn",ans);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:31: error: expected ';' before 'for'
   16 |                         temp=0
      |                               ^
      |                               ;
   17 |                         for(i=a[num-1]+1 ; i<=n ; i++){
      |                         ~~~
Language: C

#include<stdio.h>
#include<math.h>
 
int main(){
	int a[80000],n,i,j,ans=0,temp=0;
	a[0]=2;
	while(scanf("%d",&n)!=EOF){
		if (a[n-1] > n){
			for(int i=0; 1=1 ; i++){
				if(a[i] > n){
					ans = i;
					break;
				}
			}
		}else{
			temp=0
			for(i=a[num-1]+1 ; i<=n ; i++){           
				for (j=0 ; a[j]*a[j] <= i ; j++){
					if(i % a[j] == 0){
						temp=1;
						break;
					}
				}
				if(temp==1){
					a[ans] = i;
					ans++;
				}
			}
    	}
		printf("%dn",ans);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:39: error: lvalue required as left operand of assignment
    9 |                         for(int i=0; 1=1 ; i++){
      |                                       ^
main.c:16:31: error: expected ';' before 'for'
   16 |                         temp=0
      |                               ^
      |                               ;
   17 |                         for(i=a[num-1]+1 ; i<=n ; i++){
      |                         ~~~
Language: C

#include<stdio.h>
#include<math.h>
 
int main(){
	int a[80000],n,i,j,ans=0,temp=0;
	a[0]=2;
	while(scanf("%d",&n)!=EOF){
		if (a[n-1] > n){
			for(i=0; i>-1 ; i++){
				if(a[i] > n){
					ans = i;
					break;
				}
			}
		}else{
			temp=0;
			for(i=a[num-1]+1 ; i<=n ; i++){           
				for (j=0 ; a[j]*a[j] <= i ; j++){
					if(i % a[j] == 0){
						temp=1;
						break;
					}
				}
				if(temp==1){
					a[ans] = i;
					ans++;
				}
			}
    	}
		printf("%dn",ans);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:33: error: 'num' undeclared (first use in this function)
   17 |                         for(i=a[num-1]+1 ; i<=n ; i++){
      |                                 ^~~
main.c:17:33: note: each undeclared identifier is reported only once for each function it appears in
Language: C

s,n;main(j){for(;scanf("%d",&n)*n;printf("%d\n",s))for(s=n-1;j=n>1;--n)for(;++j*j>i?0:i%j?:!s--;);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | s,n;main(j){for(;scanf("%d",&n)*n;printf("%d\n",s))for(s=n-1;j=n>1;--n)for(;++j*j>i?0:i%j?:!s--;);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
    1 | s,n;main(j){for(;scanf("%d",&n)*n;printf("%d\n",s))for(s=n-1;j=n>1;--n)for(;++j*j>i?0:i%j?:!s--;);}
      |   ^
main.c:1:5: error: return type defaults to 'int' [-Wimplicit-int]
    1 | s,n;main(j){for(;scanf("%d",&n)*n;printf("%d\n",s))for(s=n-1;j=n>1;--n)for(;++j*j>i?0:i%j?:!s--;);}
      |     ^~~~
main.c: In function 'main':
main.c:1:5: error: type of 'j' defaults to 'int' [-Wimplicit-int]
main.c:1:18: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | s,n;main(j){for(;scanf("%d",&n)*n;printf("%d\n",s))for(s=n-1;j=n>1;--n)for(;++j*j>i?0:i%j?:!s--;);}
      |                  ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | s,n;main(j){for(;scanf("%d",&n)*n;printf("%d\n",s))for(s=n-1;j=n>1;--n)for(;++j*j>i?0:i%j?:!s--;);}
main.c:1:18: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | s,n;main(j){for(;scanf("%d",&n)*n;printf("%d\n",s))for(s=n-1;j=n>1;--n)for(;++j*j>i?0:i%j?:!s--;);}
      |                  ^~~~~
main.c:1:18: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:35: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | s,n;main(j){for(;scanf("%d",&n)*n;printf("%d\n",s))for(s=n-1;j=n>1;--n)for(;++j*j>i?0:i%j?:!s--;);}
      |                                   ^~~~~~
main.c:1:35: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:35: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:35: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:83: error: 'i' undeclared (first use in this function)
    1 | s,n;main(j){for(;scanf("%d",&n)*n;printf("%d\n",s))for(s=n-1;j=n>1;--n)for(;++j*j>i?0:i%j?:!s--;);}
      |                                                                                   ^
main.c:1:83: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <stdlib.h>
#define FALSE 0
#define TRUE 1

char flag[N +1];

int main (int argc, char* argv[])
{
  int i, p, k, count, n;

  while (scanf("%d", &n) != EOF) {
    count = 1;
    for (i=0; i<=n; i++) {
      flag[i] = TRUE;
    }
    for (i=0; i<=n; i++) {
      if (flag[i]) {
	p = i + i + 3;
	for (k=i+p; k<=n; k++) {
	  flag[k] = FALSE;
	}
	count++;
      }
    }
    printf("%d\n", count);
  }
  
  return 0;
}

Compiler output:
main.c:6:11: error: 'N' undeclared here (not in a function)
    6 | char flag[N +1];
      |           ^
Language: C

#include<iostream>
using namespace std;
int main(){
	bool num[1000000] = {0};
	for(int i=2; i<1000000; i++){
		if(!num[i]){
			for(int j=i*2; j<=500000; j+=i){num[j] = true;}
		}
	}
	int n;
	while(cin >>n){
		int f = 0;
		for(int i=2; i<=n; i++){
			if(!num[i]){f++;}
		}
		cout <<f<<endl;
	}
}

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

#include <iostream>
#include <cmath>

using namespace std;


int main(){
	const int MAX_NUM=1000000;
	int table[MAX_NUM]={};
	for(int i=2;i<1001;i++){
		if(table[i]==1)continue;
		for(int j=i*2;j<MAX_NUM;j+=i){
			table[j]=1;
		}
	}

	int input;
	while(cin>>input){
		int count=0;
		for(int i=2;i<input;i++){
			//cout<<"table:"<<i<<"="<<table[i]<<"\n";		
			if(table[i]==0)count++;
		}
		cout<<count<<"\n";
	}
	return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

int array[1000000];
int main(){
	int n;
	int i;
	int j;
	int result;
	while(scanf("%d",&n)!=EOF){
		result = 0;
		for(i=1;i<n+1;i++){
			array[i] = 1;
		}
		for(i=2;i<n+1;i++){
			if(array[i]){
				result += 1;
				for(j=2;j<n/i+1;j++){
					array[i*j] = 0;
				}
			}
		}
		printf("%d\n",result);
	}
　　　　 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:1: error: stray '\343' in program
   24 | <U+3000><U+3000><U+3000><U+3000> return 0;
      | ^~~~~~~~
main.c:24:3: error: stray '\343' in program
   24 | <U+3000><U+3000><U+3000><U+3000> return 0;
      |         ^~~~~~~~
main.c:24:5: error: stray '\343' in program
   24 | <U+3000><U+3000><U+3000><U+3000> return 0;
      |                 ^~~~~~~~
main.c:24:7: error: stray '\343' in program
   24 | <U+3000><U+3000><U+3000><U+3000> return 0;
      |                         ^~~~~~~~
Language: C

#include<stdio.h>
#define max 1000001;

int main(void)
{
	int *d, f1, f2, n, cnt;
	d = new int [max];
	for(f1 = 0; f1 < max; f1++)
	{
		d[f1] = 1;
	}
	for(f1 = 2; f1 *f1 < max; f1++)
	{
		if(d[f1] == 1)
		{
			for(f2 = 2 * f1; f2 < max; f2 += f1)
			{
				d[f2] = 0;
			}
		}
	}
	while (scanf("%d",&n) != EOF)
	{
		cnt=  0;
		for(f1 = 2; f1 >= n; f1++)
		{
			if(d[f1] == 1)
				cnt++;
		}
		printf("%d\n",cnt);
	}
	return 0;
}
	

Compiler output:
main.c: In function 'main':
main.c:7:13: error: 'new' undeclared (first use in this function)
    7 |         d = new int [max];
      |             ^~~
main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:16: error: expected ';' before 'int'
    7 |         d = new int [max];
      |                ^~~~
      |                ;
main.c:8:29: error: expected expression before ';' token
    8 |         for(f1 = 0; f1 < max; f1++)
      |                             ^
main.c:12:33: error: expected expression before ';' token
   12 |         for(f1 = 2; f1 *f1 < max; f1++)
      |                                 ^
main.c:16:50: error: expected expression before ';' token
   16 |                         for(f2 = 2 * f1; f2 < max; f2 += f1)
      |                                                  ^
Language: C

/*#include <stdio.h>
  int main(){
    int a,b,c,d,n,sum=0;
      while(scanf("%d",&n) != EOF){
       for(a=0;a<10;a++){
          for(b=0;b<10;b++){
             for(c=0;c<10;c++){
                for(d=0;d<10;d++){
                    if(a+b+c+d==n)
                        sum++;
                          }
                            }
                             }
                               }
                                printf("%d\n",sum);
                                 sum=0;
                                   }
return 0;
}*/#include <stdio.h>
  int main(){
   int i,j,n,hantei=0;
   int sum=0;
   scanf("%d",&n);
    for(i=2;i<=n;i++){
      for(j=2;j*j<=i;j++){
        if(i%j != 0 || i == j){
            hantei += 0;
               }else{
                  hantei += 1;
                    }
}
if(hantei == 0){
sum++;

}
hantei=0;
}
printf("%d\n",sum);
sum=0;
hantei = 0;
}
return 0;
}
           

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

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

int main(void)
{
    int n, box[1000], flag = 0, count = 2;
    box[0]=2;
    box[1]=3;    
    scanf("%d",&n);
    for(int i = 4; i < n; i++ ){
        
        flag = 0;
        
        for(int j = 0; box[j] <= sqrt(i); j++){
            if(i % box[j] == 0){
                flag = 1;
                break;
            }
        }
        
        if(flag == 0){
            box[count] = i;
            count++;
        }
    }
    
    printf("%d", count);
    return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccrqjfM1.o: in function `main':
main.c:(.text+0xbb): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
#define MAX 1000100

int main(void){
	bool prime[MAX];
	int i,j,n,count;
	for(i=0;i<MAX;i++){
		prime[i]=1;
	}
	prime[0]=prime[1]=0;
	
	for(i=2;i<MAX;i++){
		for(j=2;i*j<MAX;j++){
			prime[i*j]=0;
		}
	}

	while((scanf("%d",&n))!=EOF){
		count=0; 
		for(i=0;i<n+1;i++){
			if(prime[i]==1){
				count++;
			}
		}
		printf("%d\n",count);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: unknown type name 'bool'
    5 |         bool prime[MAX];
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | #define MAX 1000100
Language: C

#include<stdio.h>
#include<math.h>
int main(void)
{
	long long i,j,p,n,count;
	bool flag[1000000];
	while((scanf("%lld",&n)) != EOF)
	{
		p = (long long)sqrt((double)n);
		for(i = 3; i <= p; i = i + 2)
		{
			for(j = i * i; j < n; j = j + 2 * i)
			{
				flag[j] = false;
				
			}
		}
	
		count = 1;
		for(i = 3; i <= n; i = i + 2)
		{
			if(flag[i])
				count++;
		}
		printf("%lld\n",count);
	}

		
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: unknown type name 'bool'
    6 |         bool flag[1000000];
      |         ^~~~
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 | int main(void)
main.c:14:43: error: 'false' undeclared (first use in this function)
   14 |                                 flag[j] = false;
      |                                           ^~~~~
main.c:14:43: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:14:43: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

using namespace std;

#define MAX 10000000
#define LMT 3163
int sieve();
int calculation();

unsigned flag[MAX>>6];
int primes[5761455];

#define ifc(n) (flag[n>>6]&(1<<((n>>1)&31)))
#define isc(n) (flag[n>>6]|=(1<<((n>>1)&31)))

int main()
{
    sieve();
    return 0;
}


int sieve()
{
    unsigned i, j, k;
    for(i=3; i<LMT; i+=2)
        if(!ifc(i))
            for(j=i*i, k=i<<1; j<MAX; j+=k)
                isc(j);
    calculation();
    return 0;
}

int calculation()
{
    int Rang, count;
    unsigned int i;
    int k = 1;
    primes[0] = 2;
    for( i=3; i<MAX; i+=2)
    {
        if(ifc(i)==0)
            primes[k++] = i;
    }
    while(scanf("%d",&Rang)==1)
    {
        count = 0;
        for(i=0; i<Rang; i++)
        {
            if(primes[i]<=Rang)
            {
                count++;
            }
            else if(primes[i]>Rang)
                break;
        }
        cout << count << "\n";
    }
    return 0;
}

Compiler output:
main.c:2:10: fatal error: iostream: No such file or directory
    2 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

 #include <stdio.h>
   

   int main(void){
     char check=1;
     int i,j,k,m,n;
     int num[150000];
     num[0] = 2;
　　　k=0
       for(i=3;i<=1000000;i=i+2){
          for( j=0; j<=k; j++){  
           if(i%num[j] == 0){
               check =0; break;
           }
           if(!check )
              break;
              }
           if(check)｛
　　　　　　　K++;
           num[k]=i;
          }else
            check =1;
}

                  
　　  while( (scanf("%d",&n);) != EOF){
             for(m=0; m<=k; m++){
                 if( num[m]<=n)
                      break;
                 }
                 printf("%d\n",m+1);
             }
       return 0;
}  
      

Compiler output:
main.c: In function 'main':
main.c:9:1: error: stray '\343' in program
    9 | <U+3000><U+3000><U+3000>k=0
      | ^~~~~~~~
main.c:9:3: error: stray '\343' in program
    9 | <U+3000><U+3000><U+3000>k=0
      |         ^~~~~~~~
main.c:9:5: error: stray '\343' in program
    9 | <U+3000><U+3000><U+3000>k=0
      |                 ^~~~~~~~
main.c:9:10: error: expected ';' before 'for'
    9 | 　　　k=0
      |          ^
      |          ;
   10 |        for(i=3;i<=1000000;i=i+2){
      |        ~~~
main.c:19:1: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>K++;
      | ^~~~~~~~
main.c:19:3: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>K++;
      |         ^~~~~~~~
main.c:19:5: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>K++;
      |                 ^~~~~~~~
main.c:19:7: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>K++;
      |                         ^~~~~~~~
main.c:19:9: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>K++;
      |                                 ^~~~~~~~
main.c:19:11: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>K++;
      |                                         ^~~~~~~~
main.c:19:13: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>K++;
      |                                                 ^~~~~~~~
main.c: At top level:
main.c:26:1: error: stray '\343' in program
   26 | <U+3000><U+3000>  while( (scanf("%d",&n);) != EOF){
      | ^~~~~~~~
main.c:26:3: error: stray '\343' in program
   26 | <U+3000><U+3000>  while( (scanf("%d",&n);) != EOF){
      |         ^~~~~~~~
main.c:26:7: error: expected identifier or '(' before 'while'
   26 | 　　  while( (scanf("%d",&n);) != EOF){
      |       ^~~~~
main.c:26:30: error: expected identifier or '(' before ')' token
   26 | 　　  while( (scanf("%d",&n);) != EOF){
      |                              ^
main.c:33:8: error: expected identifier or '(' before 'return'
   33 |        return 0;
      |        ^~~~~~
main.c:34:1: error: expected identifier or '(' before '}' token
   34 | }
      | ^
Language: C

 #include <stdio.h>
   

   int main(void){
     char check=1;
     int i,j,k,m,n;
     int num[150000];
     num[0] = 2;
      k=0;
       for(i=3;i<=1000000;i=i+2){
          for( j=0; j<=k; j++){  
           if(i%num[j] == 0){
               check =0; break;
           }
           if(!check )
              break;
              }
           if(check)｛
　　　　　　　k++;
           num[k]=i;
          }else
            check =1;
}

                  
　　  while( (scanf("%d",&n);) != EOF){
             for(m=0; m<=k; m++){
                 if( num[m]<=n)
                      break;
                 }
                 printf("%d\n",m+1);
             }
       return 0;
}  
      

Compiler output:
main.c: In function 'main':
main.c:19:1: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      | ^~~~~~~~
main.c:19:3: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      |         ^~~~~~~~
main.c:19:5: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      |                 ^~~~~~~~
main.c:19:7: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      |                         ^~~~~~~~
main.c:19:9: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      |                                 ^~~~~~~~
main.c:19:11: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      |                                         ^~~~~~~~
main.c:19:13: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      |                                                 ^~~~~~~~
main.c:18:21: error: '\U0000ff5b' undeclared (first use in this function)
   18 |            if(check)｛
      |                     ^~
main.c:18:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:18:23: error: expected ';' before 'k'
   18 |            if(check)｛
      |                       ^
      |                       ;
   19 | 　　　　　　　k++;
      |               ~        
main.c:21:12: error: 'else' without a previous 'if'
   21 |           }else
      |            ^~~~
main.c: At top level:
main.c:26:1: error: stray '\343' in program
   26 | <U+3000><U+3000>  while( (scanf("%d",&n);) != EOF){
      | ^~~~~~~~
main.c:26:3: error: stray '\343' in program
   26 | <U+3000><U+3000>  while( (scanf("%d",&n);) != EOF){
      |         ^~~~~~~~
main.c:26:7: error: expected identifier or '(' before 'while'
   26 | 　　  while( (scanf("%d",&n);) != EOF){
      |       ^~~~~
main.c:26:30: error: expected identifier or '(' before ')' token
   26 | 　　  while( (scanf("%d",&n);) != EOF){
      |                              ^
main.c:33:8: error: expected identifier or '(' before 'return'
   33 |        return 0;
      |        ^~~~~~
main.c:34:1: error: expected identifier or '(' before '}' token
   34 | }
      | ^
Language: C

 #include <stdio.h>
   

   int main(void){
     char check=1;
     int i,j,k,m,n;
     int num[150000];
     num[0] = 2;
      k=0;
       for(i=3;i<=1000000;i=i+2){
          for( j=0; j<=k; j++){  
           if(i%num[j] == 0){
               check =0; break;
           }
           if(!check )
              break;
              }
           if(check){
　　　　　　　k++;
           num[k]=i;
          }else{
            check =1;
}
}

                  
　　  while( scanf("%d",&n) != EOF){
             for(m=0; m<=k; m++){
                 if( num[m]<=n)
                      break;
                 }
                 printf("%d\n",m+1);
             }
       return 0;
}  
      

Compiler output:
main.c: In function 'main':
main.c:19:1: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      | ^~~~~~~~
main.c:19:3: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      |         ^~~~~~~~
main.c:19:5: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      |                 ^~~~~~~~
main.c:19:7: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      |                         ^~~~~~~~
main.c:19:9: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      |                                 ^~~~~~~~
main.c:19:11: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      |                                         ^~~~~~~~
main.c:19:13: error: stray '\343' in program
   19 | <U+3000><U+3000><U+3000><U+3000><U+3000><U+3000><U+3000>k++;
      |                                                 ^~~~~~~~
main.c:27:1: error: stray '\343' in program
   27 | <U+3000><U+3000>  while( scanf("%d",&n) != EOF){
      | ^~~~~~~~
main.c:27:3: error: stray '\343' in program
   27 | <U+3000><U+3000>  while( scanf("%d",&n) != EOF){
      |         ^~~~~~~~