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

#include<stdio.h>
const int MAX_V = 10000;
int prime[MAX_V+1];
int main(){
        int i, j, v, n;
        for(i = 2; i <= MAX_V; i++){
                prime[i] = 1;
        }
        for(i = 2; i * i <= MAX_V; i++){
                if(prime[i]){
                        for(j = 2 * i; j <= MAX_V; j += i){
                                prime[j] = 0;
                        }
                }
        }
        for(;;){
                scanf("%d", &n);
                if(n == 0) break;
                for(i = n - 2; i >= 2; i--){
                        if(prime[i] == 1 && prime[i + 2] == 1){
                                printf("%d %d\n", i, i + 2);
                                break;
                        }
                }
        }
        return 0;
}

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

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

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

#include<stdio.h>

const int MAX_V = 1000000; // 100???????????? ?´???°??¨?????????
int prime[MAX_V+1]; // 1???????´???°???0???????´???°?????? ??????

int main() {
  int i, k, v;
  for(i = 2; i <= MAX_V; i++) {
      prime[i] = 1; // 2??\??? ?´???°??¨??????
    }
      for(i = 2; i*i <= MAX_V; i++) {
        if(prime[i]) {
          for(k = 2 * i; k <= MAX_V; k += i) {
            prime[k] = 0; // ?´???° 2?????\??? ?????° ?´???°?????? ??????
          }
        }
      }
  while(scanf("%d", &v) != EOF) {   
  int s = 0;
  for(int i = 5;i <= v;i++){
    int isprime = prime[i];
    if(isprime){
      s++;
    }
  }
  int side[s],d = 0;
  for(int i = 5;i <= v;i++){
    int isprime = prime[i];
      if(isprime) {
        side[d] = i;
        d++;
      }
    }
  int m = d-1;
  int dai = 0,syo = 0;
  for(int n = m;n >= 0;n--){
    if(side[n] - side[n-1] == 2){
      if(syo < side[n-1]){
        syo = side[n-1];
        dai = side[n];
      }
    }
  }
  printf("%d %d\n",syo,dai);
}
  return 0;
}

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

#include<stdio.h>

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

int main() {
  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; 
          }
        }
      }
  while(scanf("%d", &v) != EOF) {
  int s = 0;
  for(int i = 5;i <= v;i++){
    int isprime = prime[i];
    if(isprime){
      s++;
    }
  }
  int side[s],d = 0;
  for(int i = 5;i <= v;i++){
    int isprime = prime[i];
      if(isprime) {
        side[d] = i;
        d++;
      }
    }
  int m = d-1;
  int dai = 0,syo = 0;
  for(int n = m;n >= 0;n--){
    if(side[n] - side[n-1] == 2){
      if(syo < side[n-1]){
        syo = side[n-1];
        dai = side[n];
      }
    }
  }
  printf("%d %d\n",syo,dai);
}
  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>
const int MAX_V = 10000;
int prime[MAX_V+1];
int main() {
int i, k, v, max;
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;
   }
 }
}
while(1) {
scanf("%d",&v);
if(v==0) break;
for(i=v;i>=1;i--){
	if(prime[i]==1 &&prime[i-2]==1){
		max=i;
		break;
	}
}
printf("%d %d\n",max-2,max);
}
return 0;
}
		

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

#include <stdio.h>
const int MAX_V = 10000;
int prime[MAX_V+1];
int main() {
int i, k, v, max;
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;
   }
 }
}
while(1) {
scanf("%d",&v);
if(v==0) break;
for(i=v;i>=1;i--){
	if(prime[i]==1 &&prime[i-2]==1){
		max=i;
		break;
	}
}
printf("%d %d\n",max-2,max);
}
return 0;
}

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

#include<stdio.h>

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

int main(){
	int n, p1, q1;
	int data[10000];
	for(i = 2;i <= n;i++){
		data[i] = isprime(i);
	}
	while(scanf("%d", &n) != EOF){
		if(n == 0) break;
		else {
			for(i = n;i >= 2;i--){
				if(data[i] == 1 && data[i-2] == 1){
					printf("%d %d\n", data[i], data[i-2]);
				}
			}
		}
	}
	return 0;
}

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

#include<stdio.h>
const int MAX_V = 100000;
int prime[MAX_V+1];
int main() {
    int i=0, k,v[10000],y;
    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;
            }
        }
    }
    for(;;){
        scanf("%d",&v[i]);
        if(v[i]==0)break;
        i++;
    }
    int j=i;
    for(i=0;i<j;i++){
        for(y=v[i];y>0;y--){
        int isprime = prime[y];
            if(isprime){
                isprime=prime[y-2];
                if(isprime) {
                    printf("%d %d\n",y-2,y);
                    break;
                }
            }
        }
    }
    return 0;
}

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

#include<stdio.h>
const int MAX_V = 100000;
int prime[MAX_V+1];
int main() {
    int i=0, k,v[10000],y;
    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;
            }
        }
    }
    for(;;){
        scanf("%d",&v[i]);
        if(v[i]==0)break;
        i++;
    }
    int j=i;
    for(i=0;i<j;i++){
        for(y=v[i];y>0;y--){
            int isprime = prime[y];
            if(isprime){
                isprime=prime[y-2];
                if(isprime) {
                    printf("%d %d\n",y-2,y);
                    break;
                }
            }
        }
    }
    return 0;
}

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

#include <stdio.h>

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

int main() {
	int data[10000];
	int i, k, cnt = 0, n, p1, q1;
	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;
			}
		}
	}
	while(1) {
		scanf("%d", &n);
		if(n == 0) break;
		data[cnt] = n;
		cnt++;
	}
	for(i = 0; i < cnt; i++) {
		for(k = 5; k <= data[i]; k++) {
			if(prime[k] && prime[k-2]) {
				p1 = k - 2;
				q1 = k;
			}
		}
		printf("%d %d\n", p1, q1);
	}
	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>

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

int main(){
	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;
			}
		}
	}
	while(scanf("%d", &v) != EOF){
		if(v == 0) break;
		for(int i = v;i >= 2;i--){
			if(prime[i] == 1 && prime[i-1] == 1){
				q1 = prime[i];
				break;
			}
		}
		printf("%d %d", q1-2, q1);
	}
	return 0;
}

Compiler output:
main.c:4:5: error: variably modified 'prime' at file scope
    4 | int prime[MAX_V + 1];
      |     ^~~~~
main.c: In function 'main':
main.c:22:33: error: 'q1' undeclared (first use in this function)
   22 |                                 q1 = prime[i];
      |                                 ^~
main.c:22:33: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

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

int main(){
	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;
			}
		}
	}
	while(scanf("%d", &v) != EOF){
		if(v == 0) break;
		for(int i = v;i >= 2;i--){
			if(prime[i] == 1 && prime[i-1] == 1){
				q1 = prime[i];
				break;
			}
		}
		printf("%d %d\n", q1-2, q1);
	}
	return 0;
}

Compiler output:
main.c:4:5: error: variably modified 'prime' at file scope
    4 | int prime[MAX_V + 1];
      |     ^~~~~
main.c: In function 'main':
main.c:22:33: error: 'q1' undeclared (first use in this function)
   22 |                                 q1 = prime[i];
      |                                 ^~
main.c:22:33: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

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

int main(){
	int i, k, v, q1;
	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;
			}
		}
	}
	while(scanf("%d", &v) != EOF){
		if(v == 0) break;
		for(int i = v;i >= 2;i--){
			if(prime[i] == 1 && prime[i-2] == 1){
				q1 = prime[i];
				break;
			}
		}
		printf("%d %d\n", q1-2, q1);
	}
	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>

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

int main(){
	int i, k, v, q1;
	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;
			}
		}
	}
	while(1){
		scanf("%d", &v);
		if(v == 0) break;
		for(i = v;i >= 2;i--){
			if(prime[i]){
				if(prime[i-2]){
					q1 = i;
					break;
				}
			}
			}
		printf("%d %d\n", q1 - 2, q1);
	}
	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>

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

int main(){
	int i, k, v, q1;
	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;
			}
		}
	}
	while(scanf("%d", &v) != EOF){
		if(v == 0) break;
		for(i = v;i >= 2;i--){
			if(prime[i]){
				if(prime[i-2]){
					q1 = i;
					break;
				}
			}
		}
		printf("%d %d\n", q1 - 2, q1);
	}
	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>

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

int main(){
	int v, q1;
	for(int i = 2;i <= MAX_V;i++){
		prime[i] = 1;
	}
	for(int i = 2; i * i <= MAX_V;i++){
		if(prime[i]){
			for(int k = 2 * i;k <= MAX_V; k += i){
				prime[k] = 0;
			}
		}
	}
	while(scanf("%d", &v) != EOF){
		if(v == 0) break;
		for(int i = v;i >= 2;i--){
			if(prime[i]){
				if(prime[i-2]){
					q1 = i;
					break;
				}
			}
		}
		printf("%d %d\n", q1 - 2, q1);
	}
	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>
#define

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

int main(){
	int v, q1;
	for(int i = 2;i <= MAX_V;i++){
		prime[i] = 1;
	}
	for(int i = 2; i * i <= MAX_V;i++){
		if(prime[i]){
			for(int k = 2 * i;k <= MAX_V; k += i){
				prime[k] = 0;
			}
		}
	}
	while(scanf("%d", &v) != EOF){
		if(v == 0) break;
		for(int i = v;i >= 2;i--){
			if(prime[i]){
				if(prime[i-2]){
					q1 = i;
					break;
				}
			}
		}
		printf("%d %d\n", q1 - 2, q1);
	}
	return 0;
}

Compiler output:
main.c:2:8: error: no macro name given in #define directive
    2 | #define
      |        ^
main.c:5:5: error: variably modified 'prime' at file scope
    5 | int prime[MAX_V+1];
      |     ^~~~~
Language: C

#include<stdio.h>
#define

const int MAX_V = 10000;
int prime[10001];

int main(){
	int v, q1;
	for(int i = 2;i <= MAX_V;i++){
		prime[i] = 1;
	}
	for(int i = 2; i * i <= MAX_V;i++){
		if(prime[i]){
			for(int k = 2 * i;k <= MAX_V; k += i){
				prime[k] = 0;
			}
		}
	}
	while(scanf("%d", &v) != EOF){
		if(v == 0) break;
		for(int i = v;i >= 2;i--){
			if(prime[i]){
				if(prime[i-2]){
					q1 = i;
					break;
				}
			}
		}
		printf("%d %d\n", q1 - 2, q1);
	}
	return 0;
}

Compiler output:
main.c:2:8: error: no macro name given in #define directive
    2 | #define
      |        ^
Language: C

#include<stdio.h>
const int MAX_V = 1000000;
int prime[MAX_V+1];
int prime_j(int n){
  //printf("%d???prime\n", n);//???????????°
  int i;
  if(prime[n]){
    return 0;
  }
  return 1;
}
int main(){
  int n, i, k;
  for(i = 2;i < MAX_V;i++){
    prime[i] = 1;
  }
  for(i=2;i*i<=MAX_V;i++){
    if(prime[i]){
      for(k = 2*1;k <= MAX_V;k += i){
        prime[k] = 0;
      }
    }
  }
  scanf("%d", &n);
  while(n != 0){
    for(i=n;i>0;i--){
      if(prime_j(i)){
        if(prime_j(i-2)){
          printf("%d %d\n", i-2, i);
          break;
        }
      }
    }
    scanf("%d", &n);
    //printf("n=%d\n", n);//???????????°
  }
  return 0;
}

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

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

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

#include<stdio.h>
const int MAX_V = 1000000;
int prime[MAX_V + 1];
int main(){
  int n, i, k;
  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;
      }
    }
  }
  scanf("%d", &n);
  while(n != 0){
    for(i=n;i>0;i--){
      if(prime[i]){
        if(prime[i-2]){
          printf("%d %d\n", i-2, i);
          break;
        }
      }
    }
    scanf("%d", &n);
  }
  return 0;
}

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

#include<stdio.h>
#define MAX_V = 1000000
int prime[MAX_V + 1];
int main(){
  int n, i, k;
  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;
      }
    }
  }
  scanf("%d", &n);
  while(n != 0){
    for(i=n;i>0;i--){
      if(prime[i]){
        if(prime[i-2]){
          printf("%d %d\n", i-2, i);
          break;
        }
      }
    }
    scanf("%d", &n);
  }
  return 0;
}

Compiler output:
main.c:2:15: error: expected expression before '=' token
    2 | #define MAX_V = 1000000
      |               ^
main.c:3:11: note: in expansion of macro 'MAX_V'
    3 | int prime[MAX_V + 1];
      |           ^~~~~
main.c: In function 'main':
main.c:2:15: error: expected expression before '=' token
    2 | #define MAX_V = 1000000
      |               ^
main.c:6:18: note: in expansion of macro 'MAX_V'
    6 |   for(i = 2;i <= MAX_V;i++){
      |                  ^~~~~
main.c:7:5: error: 'prime' undeclared (first use in this function)
    7 |     prime[i] = 1;
      |     ^~~~~
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:2:15: error: expected expression before '=' token
    2 | #define MAX_V = 1000000
      |               ^
main.c:9:16: note: in expansion of macro 'MAX_V'
    9 |   for(i=2;i*i<=MAX_V;i++){
      |                ^~~~~
main.c:2:15: error: expected expression before '=' token
    2 | #define MAX_V = 1000000
      |               ^
main.c:11:24: note: in expansion of macro 'MAX_V'
   11 |       for(k = 2*i;k <= MAX_V;k += i){
      |                        ^~~~~
Language: C

#include<stdio.h>

const int MAX_V = 10000;
	int prime[10001];

int main(){
	int i, n, sum = 0;
	for(i = 2;i <= MAX_V;i++){
		prime[i] = 1;
	}
	for(i = 2; i * i <= MAX_V;i++){
		if(prime[i]){
			for(int k = 2 * i;k <= MAX_V; k += i){
				prime[k] = 0;
			}
		}
	}
	while(scanf("%d", &n) != EOF){
		if(n == 0) break;
		for(int i = n;i >= 2;i--){
			if(prime(i)){
				if(prime(i-2)){
					q1 = i;
					break;
				}
			}
		}
		printf("%d %d\n", q1 - 2, q1);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:28: error: called object 'prime' is not a function or function pointer
   21 |                         if(prime(i)){
      |                            ^~~~~
main.c:4:13: note: declared here
    4 |         int prime[10001];
      |             ^~~~~
main.c:22:36: error: called object 'prime' is not a function or function pointer
   22 |                                 if(prime(i-2)){
      |                                    ^~~~~
main.c:4:13: note: declared here
    4 |         int prime[10001];
      |             ^~~~~
main.c:23:41: error: 'q1' undeclared (first use in this function)
   23 |                                         q1 = i;
      |                                         ^~
main.c:23:41: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

const int MAX_V = 10000;
	int prime[10001];

int main(){
	int i, n, q1;
	for(i = 2;i <= MAX_V;i++){
		prime[i] = 1;
	}
	for(i = 2; i * i <= MAX_V;i++){
		if(prime[i]){
			for(int k = 2 * i;k <= MAX_V; k += i){
				prime[k] = 0;
			}
		}
	}
	while(scanf("%d", &n) != EOF){
		if(n == 0) break;
		for(int i = n;i >= 2;i--){
			if(prime(i)){
				if(prime(i-2)){
					q1 = i;
					break;
				}
			}
		}
		printf("%d %d\n", q1 - 2, q1);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:28: error: called object 'prime' is not a function or function pointer
   21 |                         if(prime(i)){
      |                            ^~~~~
main.c:4:13: note: declared here
    4 |         int prime[10001];
      |             ^~~~~
main.c:22:36: error: called object 'prime' is not a function or function pointer
   22 |                                 if(prime(i-2)){
      |                                    ^~~~~
main.c:4:13: note: declared here
    4 |         int prime[10001];
      |             ^~~~~
Language: C

#include <stdio.h>
const int MAX = 10000;
int prime[MAX+1];
int twin_prime[MAX+1];

void isprime(int n) {
    int i, k, l = 0, p1, q1;
    for(i = 2; i <= n; i++) {
        prime[i] = 1;
    }
    for(i = 2; i <= n; i++) {
        if(prime[i]) {
            for(k = 2*i; k <= n; k+=i) {
                prime[k] = 0;
            }
        }
        if(prime[i]) {
            twin_prime[l] = i;
            l++;
        }
    }
    for(i = 0; i < l; i++) {
        if(twin_prime[i+1]-twin_prime[i]==2) {
            p1 = twin_prime[i];
            q1 = twin_prime[i+1];
        }
    }
    printf("%d %d\n", p1, q1);
}

int main() {
    int i, n;
    for(i = 0; i < MAX; i++) {
        scanf("%d", &n);
        if(n == 0) break;
        isprime(n);
    }
}

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

#include <stdio.h>
int prime[10001];
int twin_prime[10001];

void isprime(int n) {
    int i, k, l = 0, p1, q1;
    for(i = 2; i <= n; i++) {
        prime[i] = 1;
    }
    for(i = 2; i <= n; i++) {
        if(prime[i]) {
            for(k = 2*i; k <= n; k+=i) {
                prime[k] = 0;
            }
        }
        if(prime[i]) {
            twin_prime[l] = i;
            l++;
        }
    }
    for(i = 0; i < l; i++) {
        if(twin_prime[i+1]-twin_prime[i]==2) {
            p1 = twin_prime[i];
            q1 = twin_prime[i+1];
        }
    }
    printf("%d %d\n", p1, q1);
}

int main() {
    int i, n;
    for(i = 0; i < MAX; i++) {
        scanf("%d", &n);
        if(n == 0) break;
        isprime(n);
    }
}

Compiler output:
main.c: In function 'main':
main.c:32:20: error: 'MAX' undeclared (first use in this function)
   32 |     for(i = 0; i < MAX; i++) {
      |                    ^~~
main.c:32:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
long int prime[10001];
long int twin_prime[10001];

void isprime(int n) {
    int i, k, l = 0, p1, q1;
    for(i = 2; i <= n; i++) {
        prime[i] = 1;
    }
    for(i = 2; i <= n; i++) {
        if(prime[i]) {
            for(k = 2*i; k <= n; k+=i) {
                prime[k] = 0;
            }
        }
        if(prime[i]) {
            twin_prime[l] = i;
            l++;
        }
    }
    for(i = 0; i < l; i++) {
        if(twin_prime[i+1]-twin_prime[i]==2) {
            p1 = twin_prime[i];
            q1 = twin_prime[i+1];
        }
    }
    printf("%d %d\n", p1, q1);
}

int main() {
    int i, n;
    for(i = 0; i < MAX; i++) {
        scanf("%d", &n);
        if(n == 0) break;
        isprime(n);
    }
}

Compiler output:
main.c: In function 'main':
main.c:32:20: error: 'MAX' undeclared (first use in this function)
   32 |     for(i = 0; i < MAX; i++) {
      |                    ^~~
main.c:32:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int prime[1000];
int twin_prime[1000];

void isprime(int n) {
    int i, k, l = 0, p1, q1;
    for(i = 2; i <= n; i++) {
        prime[i] = 1;
    }
    for(i = 2; i <= n; i++) {
        if(prime[i]) {
            for(k = 2*i; k <= n; k+=i) {
                prime[k] = 0;
            }
        }
        if(prime[i]) {
            twin_prime[l] = i;
            l++;
        }
    }
    for(i = 0; i < l; i++) {
        if(twin_prime[i+1]-twin_prime[i]==2) {
            p1 = twin_prime[i];
            q1 = twin_prime[i+1];
        }
    }
    printf("%d %d\n", p1, q1);
}

int main() {
    int i, n;
    for(i = 0; i < MAX; i++) {
        scanf("%d", &n);
        if(n == 0) break;
        isprime(n);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:32:20: error: 'MAX' undeclared (first use in this function)
   32 |     for(i = 0; i < MAX; i++) {
      |                    ^~~
main.c:32:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int isprime(int n){
  for(int i = 2 ; i*i<=n ;i++){
    if(n%i==0)return 0;
}
 return 1;
}
int main(){
  int n ,i , fir ,sec;
  while(scanf("%d" ,&n)){
    if(n==0)break;
    fir = 0 ,sec = 0;
    for(i=n ;i>3 ;i--){
      if(number[i] && number[i-2]){
        fir = i-2;
        sec = i;
        break;
      }
    }
    printf("%d %d\n" ,fir ,sec);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:10: error: 'number' undeclared (first use in this function)
   14 |       if(number[i] && number[i-2]){
      |          ^~~~~~
main.c:14:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int isprime(int n){
  for(int i = 2 ; i*i<=n ;i++){
    if(n%i==0)return 0;
}
 return 1;
}
int main(){
  int n ,i , fir ,sec;
  while(scanf("%d" ,&n)){
    if(n==0)break;
    fir = 0 ,sec = 0;
    for(i=n ;i>3 ;i--){
      if(isprime[i] && isprime[i-2]){
        fir = i-2;
        sec = i;
        break;
      }
    }
    printf("%d %d\n" ,fir ,sec);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:17: error: subscripted value is neither array nor pointer nor vector
   14 |       if(isprime[i] && isprime[i-2]){
      |                 ^
main.c:14:31: error: subscripted value is neither array nor pointer nor vector
   14 |       if(isprime[i] && isprime[i-2]){
      |                               ^
Language: C

#include <stdio.h>

int isprime(int n){
    for(int i=2; i*i<=n; i++){
        if(n%i==0)
        return 0;
    }
    return 1;
}
int main(){
    int num;
    while(1){
        scanf("%d", &num);
        if(num==0)break;
        for(int i=num; i>2; i--){
            if(isprime(i)==1)
                if(isprime(i-2)==1)
                    printf("%d %d\n", i-2, i)break;
        }
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:46: error: expected ';' before 'break'
   18 |                     printf("%d %d\n", i-2, i)break;
      |                                              ^~~~~
      |                                              ;
Language: C

#include <stdio.h>

const int MAX_V = 10000;
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(1){
        scanf("%d", &num);
        if(num==0)break;
        for(int i=num; i>2; i--){
            if(isprime(i)==1)
                if(isprime(i-2)==1){
                    printf("%d %d\n", i-2, i);
                    break;
                }
        }
    }
    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>
const int MAX_V = 10000;
int prime[MAX_V+1];
int main() {
int i, k, v, max;
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;
   }
 }
}
while(1) {
scanf("%d",&v);
max=0;
if(v==0) break;
for(i=v;i>=1;i--){
	if(prime[i]==1 &&prime[i-2]==1){
		max=i;
		break;
	}
}
printf("%d %d\n",max-2,max);
}
return 0;
}

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

#include<stdio.h>
const int MAX_V = 1000000;
int prime[MAX_V + 1];
int count;
int main(){
  int n, i, k;
  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;
      }
    }
  }
  scanf("%d", &n);
  while(n != 0){
    for(i=n;i>0;i--){
      if(prime[i]){
        if(prime[i-2]){
          printf("%d %d\n", i-2, i);
          break;
        }
      }
    }
    scanf("%d", &n);
  }
  return 0;
}

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

#include<stdio.h>
#include<string.h>
int main(){
	int n,i,j,ans;
	bool f[500005];
	memset(f,true,sizeof(f));
	f[0]=f[1]=false;
	for(i=3;i<10005;i++){
		if(f[i]){
			for(j=2;i*j<10005;j++){
				f[i*j]=false;}
		}
	}
	while(1){
		scanf("%d",&n);
		if(n==0)break;
		if(n%2==0)n--;
		while(1){
			if(f[n] && f[n-2]){
				printf("%d %d\n",n-2,n);
				break;
			}else n-=2;
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: unknown type name 'bool'
    5 |         bool f[500005];
      |         ^~~~
main.c:3:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    2 | #include<string.h>
  +++ |+#include <stdbool.h>
    3 | int main(){
main.c:6:18: error: 'true' undeclared (first use in this function)
    6 |         memset(f,true,sizeof(f));
      |                  ^~~~
main.c:6:18: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:6:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:19: error: 'false' undeclared (first use in this function)
    7 |         f[0]=f[1]=false;
      |                   ^~~~~
main.c:7:19: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include <iostream>
#include <cstring>
using namespace std;

const int lim = 10000;
bool prime[lim+10];

int main(){
    int n;
    memset(prime,-1,sizeof(prime));
    for(int i = 3; i <= lim; i += 2)
        if(prime[i])
            for(int j = i*2 ; j <= lim; j += i)
                prime[j] = 0;

    while(cin >> n && n){
        if(n % 2 == 0) n--;
        for(int i = n; i >= 5; i -= 2){
            if(prime[i] && prime[i-2]){
                cout << i-2 << " " << i << endl;
                break;
            }
        }
    }
    return 0;
}

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

#include <iostream>
#include <utility>
#include <vector>
#include <cmath>
#include <algorithm>
using namespace std;

#define gcu getchar_unlocked
#define pcu putchar_unlocked
#define _il inline
#define _in _il int in
#define _sc _il bool scan
_in(int c){int n=0;bool m=false;if(c=='-')m=true,c=gcu();
	do{n=10*n+(c-'0'),c=gcu();}while(c>='0');return m?-n:n;} //&&c<='9'
_in() {return in(gcu());}
_sc(int &n){int c=gcu();return c==EOF?false:(n=in(c),true);}
_sc(char &c){c=gcu();gcu();return c!=EOF;}
//_sc(string &s){int c;s="";
//	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
template <typename H,typename... T> _sc(H &h, T&&... t){return scan(h)&&scan(t...);}
#define _vo _il void out
#define _vl _il void outl
template <typename T>
_vo(T n){static char buf[20];char *p=buf;
	if(n<0)pcu('-'),n*=-1;if(!n)*p++='0';else while(n)*p++=n%10+'0',n/=10;
	while (p!=buf)pcu(*--p);}
_vo(const char *s){while(*s)pcu(*s++);}
_vo(char c){pcu(c);}
//_vo(string &s){for (char c: s) pcu(c);}
template <typename H,typename... T> _vo(H&& h, T&&... t){out(h);out(move(t)...);}
//template <typename T> _vo(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);out('\n');}
_vl(){out('\n');}
template <typename... T> _vl(T&&... t){out(move(t)...);outl();}

template<int N>
struct sieve {
	bool s[N];
	constexpr sieve() : s() {
		for (int i = 0; i < N; i++)
			i = true;
		for (int i = 4; i < N; i += 2)
			s[i] = false;
		for (int i = 9; i < N; i += 6)
			s[i] = false;
		for (int i = 6, e = sqrt(N); i <= e; i += 6) {
			for (int j : {i - 1, i + 1})
				if (s[j])
					for (int k = j * j; k < N; k += j)
						s[k] = false;
		}
	}
};



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++

#include<iostream>
#include<fstream>
#include<vector>
#define N 10000

int gcd(int q1,int p1){
    if(q1%p1==0) return p1;
    return gcd(p1,q1%p1);
}

int sosu(int j){
    if(j<2)return 0;
    if(j==2)return 1;
    if(j%2==0)return 0;
    for(int i=3; i<=j/2; i++){
        if(j%i==0)return 0;
    }
    return 1;
}

int main(){
    std::vector<int> n;
    n.resize(N);


Compiler output:
a.cc: In function 'int main()':
a.cc:23:17: error: expected '}' at end of input
   23 |     n.resize(N);
      |                 ^
a.cc:21:11: note: to match this '{'
   21 | int main(){
      |           ^
Language: C++

#include<fstream>
#include<vector>
#define N 10000

int gcd(int q1,int p1){
    if(q1%p1==0) return p1;
    return gcd(p1,q1%p1);
}

int sosu(int j){
    if(j<2)return 0;
    if(j==2)return 1;
    if(j%2==0)return 0;
    for(int i=3; i<=j/2; i++){
        if(j%i==0)return 0;
    }
    return 1;
}

int main(){
    std::vector<int> n;
    n.resize(N);
    for(int i=0; i<N; i++){
        std::cin >> n[i];
        if(n[i]==0)break;
    }
    for(int i=0; i<N; i++){
        if(n[i]==0)break;
        for(int j=n[i]; j>5; j--){
            if(sosu(j)&&sosu(j-2))
                if(gcd(j,j-2)==1){
                    std::cout << j-2 << " " << j <<std::endl;
                    break;
                }
            }
        }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:14: error: 'cin' is not a member of 'std'
   24 |         std::cin >> n[i];
      |              ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<vector>
  +++ |+#include <iostream>
    3 | #define N 10000
a.cc:32:26: error: 'cout' is not a member of 'std'
   32 |                     std::cout << j-2 << " " << j <<std::endl;
      |                          ^~~~
a.cc:32:26: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <stdio.h>

const int MAX_V = 1000000; // 100万まて?の素数表を作る
int prime[MAX_V+1]; // 1か?素数,0か?素数て?ない

int main() {
    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; // 素数の2倍以上の倍数は素数ではない
            }
        }
    }
    
    while(1) {
        scanf("%d", &n);
        if(n == 0) break;
        for(int i = n; i >= 5; i--) {
            if(prime(i) == 1) {
                ans[1] = i;
                if(prime(i - 2) == 1) {
                    ans[0] = i - 2;
                    break;
                }
            }
        }
        printf("%d %d\n", ans[0], ans[1]);
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:22: error: 'n' was not declared in this scope
   20 |         scanf("%d", &n);
      |                      ^
a.cc:23:21: error: 'prime' cannot be used as a function
   23 |             if(prime(i) == 1) {
      |                ~~~~~^~~
a.cc:24:17: error: 'ans' was not declared in this scope
   24 |                 ans[1] = i;
      |                 ^~~
a.cc:25:25: error: 'prime' cannot be used as a function
   25 |                 if(prime(i - 2) == 1) {
      |                    ~~~~~^~~~~~~
a.cc:31:27: error: 'ans' was not declared in this scope
   31 |         printf("%d %d\n", ans[0], ans[1]);
      |                           ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

#define MAX_N 12000

int prime[MAX_N];
bool is_prime[MAX_N + 1];


void prime_generate(){
	int p = 0;
	for(int i = 0; i <= MAX_N; i++) is_prime[i] = true;

	is_prime[0] = is_prime[1] = false;

	for(int i = 2; i <= MAX_N; i++){
		if(is_prime[i]){
			prime[p++] = i;
			for(int j = 2 * i; j <= MAX_N; j += i) is_prime[j] = false;
		}
	}
}

void solve(int n, n){
	int p1 = -1, p2 = -1;

	for(int i = 0; prime[i+1] <= n; i++){
		if(prime[i+1] - prime[i] == 2){
			if(p1 <= prime[i]){
				p1 = prime[i];
			}
			if(p2 <= prime[i+1]){
				p2 = prime[i+1];
			}
		}
	}
	cout << p1 << " " << p2 << endl;
}

int main(){
	prime_generate();

	int n;
	while(cin >> n){
		solve(n);
	}
}

Compiler output:
a.cc:24:19: error: 'n' is not a type
   24 | void solve(int n, n){
      |                   ^
a.cc: In function 'int main()':
a.cc:45:22: error: too few arguments to function 'void solve(int, int)'
   45 |                 solve(n);
      |                 ~~~~~^~~
a.cc:24:6: note: declared here
   24 | void solve(int n, n){
      |      ^~~~~
Language: C++

#include<iostream>
#include<vector>
using namespace std;
bool is_p[1000000];

void erast(int n, vector<int> &p){
  is_p[0] = is_p[1] = 1;
  p.push_back(1);
  for (int i = 2; i <= n; i++) {
    if(is_p[i] == 1)continue;
    is_p[i] = 1;
    p.push_back(i);
    for (int j = 2*i; j <= n; j += i) {
      is_p[j] = 1;
    }
  }
}
  
int main(int argc, char *argv[]){
  int n;
  while(cin >> n, n){
    memset(is_p, 0, sizeof(is_p));
    vector<int> p;
    erast(n, p);
    for (int i = p.size() - 1; i > 0; i--) {
      if(p[i] - p[i - 1] == 2){
        std::cout << p[i - 1] << " " << p[i] << std::endl;
        break;
      }
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:22:5: error: 'memset' was not declared in this scope
   22 |     memset(is_p, 0, sizeof(is_p));
      |     ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<vector>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool sosu(int q);
int mem[10005]={0};
main(){
  int n;
  while(1){
    cin>>n;
    if(n==0) break;
    int q;
    for(q=n-((n+1)%2);q-2>1;q-=2){
      if(sosu(q)&&sosu(q-2)){
	cout<<q-2<<" "<<q<<endl;
	break;
      }
    }
  }
}
bool sosu(int q){
  if(mem[q]==1){
    return 1;
  }
  else if(mem[q]==-1){
    return 0;
  }
  else{
    for(int i=3;i<=sqrt(q);i+=2){
      if(mem[i]==0||mem[i]==1){
	for(int j=i;j<=q;j+=i){
	  mem[j]=0;
	  if(j==q){
	    return 0;
	  }
	}
      }
    }
    if(mem[q]==0){
      mem[q]=1;
      return 1;
    }
  }

Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main(){
      | ^~~~
a.cc: In function 'bool sosu(int)':
a.cc:41:4: error: expected '}' at end of input
   41 |   }
      |    ^
a.cc:19:17: note: to match this '{'
   19 | bool sosu(int q){
      |                 ^
a.cc:41:4: warning: control reaches end of non-void function [-Wreturn-type]
   41 |   }
      |    ^
Language: C++

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

int	Prime(int	x){
	int	n;
	if(x	==	2)return	1;
	if(x	<	2	||	x	%	2	==	0)return	0;
	for(n	=	3;	n	<=	sqrt((double)x);	n	+=	2){
		if(x	%	n	==	0)return	0;
	}
	return	1;
}

int	main(){
	int	n,	i,	cnt	=	0,	max	=	0,	data[1000001];
	while(1){
	scanf("%d",	&n);
	if(n==) break;
	for(i	=	0;	i	<=	n;	i++){
		if(Prime(i)	==	1){
			data[cnt]	=	i;
			cnt++;
		}	
	}
	for(i	=	1;	i	<=	cnt;	i++){
		if(data[i]	-	data[i	-	1]	==	2)max	=	i;
	}
	if(max	!=	0)printf("%d %d\n",	data[max - 1],	data[max]);
	}
	return	0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:15: error: expected primary-expression before ')' token
   18 |         if(n==) break;
      |               ^
Language: C++

#include<stdio.h>
const int MAX_V = 10000;
int main(){
	int i, k, n =10, cnt = 0, idx = 2;
	int prime[MAX_V+1];
	int border[10];
	int maxprime[10] = {0};
	int difference[MAX_V+1];
	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;
			}
		}
	}
	for( i = 2; i < MAX_V; i++){
		if(prime[i] == 1){
			difference[i] = i - idx;
			idx = i;
		}
	}
	for( i = 0; i < n; i++){
		scanf("%d", &border[i]);
		if( border[i] <5 || border[i] 
		if(border[i] == 0) break;
		cnt++;
	}
	
	for( i = 0; i < cnt; i++){
		for( k = 2; k <= border[i]; k++){
			if( difference[k] == 2 && k > maxprime[i]){
				maxprime[i] = k;
			}
		}
		printf("%d %d\n", maxprime[i] - 2, maxprime[i]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:46: error: expected ';' before 'if'
   27 |                 if( border[i] <5 || border[i]
      |                                              ^
      |                                              ;
   28 |                 if(border[i] == 0) break;
      |                 ~~                            
a.cc:29:22: error: expected ')' before ';' token
   29 |                 cnt++;
      |                      ^
      |                      )
a.cc:27:19: note: to match this '('
   27 |                 if( border[i] <5 || border[i]
      |                   ^
Language: C++

#include <stdio.h>

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

int main(){
	int n,i,prime[10000];
	while(1){
		scanf("%d",&n);
		if(n==0){
			break;
		}
		for(i=n;i>=5;i--){
			if(isprime[i]==1&&isprime[i-2]==1){
				printf("%d %d\n",i-2,i);
				break;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:37: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   18 |                         if(isprime[i]==1&&isprime[i-2]==1){
      |                                     ^
a.cc:18:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                         if(isprime[i]==1&&isprime[i-2]==1){
      |                            ~~~~~~~~~~^~~
a.cc:18:54: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   18 |                         if(isprime[i]==1&&isprime[i-2]==1){
      |                                                      ^
cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]
a.cc:18:55: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                         if(isprime[i]==1&&isprime[i-2]==1){
      |                                           ~~~~~~~~~~~~^~~
Language: C++

#include "stdio.h"
const int MAX_V = 10000; // 1????????§????´???°??¨?????????
int prime[MAX_V+1]; // 1????´???°,0????´???°??§?????????
int main() {
    int i, k, n;
    for(i = 2; i <= MAX_V; i++) {
        prime[i] = 1; // 2??\???????´???°??¨??????
    }
    for(i = 2; i*i <= MAX_V; i++) {
        if(prime[i]) {
            for(k = 2 * i; k <= MAX_V; k += i) {
                prime[k] = 0; // ?´???°???2?????\???????????°????´???°??§?????????
            }
        }
    }
    scanf("%d",&n);
    if (n == 0)break;
    //while(scanf("%d", &n) != 0) {
        //        int isprime = prime[v];
        //        if(isprime) printf("%d is a prime number\n", v);
        //        else printf("%d is not a prime number\n", v);
        int p1;
        int q1;
        for(i = n;0 <= i;i--){
            if(prime[i] == 1 && prime[i-2] == 1){  //??????????´???°
                if (q1 <= i) {
                    q1 = i;
                    p1 = i-2;
                }
            }
        }
        printf("%d %d\n",p1,q1);
    }
    return 0;
}
//????¨??????¨????????????????????????

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: break statement not within loop or switch
   17 |     if (n == 0)break;
      |                ^~~~~
a.cc: At global scope:
a.cc:34:5: error: expected unqualified-id before 'return'
   34 |     return 0;
      |     ^~~~~~
a.cc:35:1: error: expected declaration before '}' token
   35 | }
      | ^
Language: C++


#include <stdio.h>

int p[10001];

int main(void)
{
  	unsigned i,k, n;
  	for (i = 0; i < 10000; i++){
   		p[i] = 1; 
 	}
	

#include <stdio.h>

int p[10001];

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

int main(void)
{
  	int i, n;
	int p[10001];
	for ( i= 0; i<10001; i++){
		p[i] = isprime(i);
	}
	 
	while(1){
		scanf("%d" , &n);
		if(n == 0)
			break;
		for(i = n ; i > 1;i--){
			if(p[i]*p[i -2] ==1)
				break;
		}
			if(n >= 5)
				printf("%d %d\n",i-2,i);
	}
		return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:1: error: a function-definition is not allowed here before '{' token
   19 | {
      | ^
a.cc:29:1: error: a function-definition is not allowed here before '{' token
   29 | {
      | ^
a.cc:48:2: error: expected '}' at end of input
   48 | }
      |  ^
a.cc:7:1: note: to match this '{'
    7 | {
      | ^
Language: C++

#include "stdio.h.h"
//#include "time.h"
//?????§??????????´???°?????????????????????
// 5<= n <= 10000
//p1=?°????????´???°p2=??§???????´???°

void isprime(int n) {
    scanf("%d",&n);
    for(int i = 2; i < n; i++) {   //??????????§????????????¨??§??¶??°??§??????????´???°??¨??????
        if(n % i == 0)return 0;    //????????????????????§?´???°??§?????????
    }
    return 1;
}


int main(){
    int i,n,p1,q1;
//    clock_t start, now;//??£?¨?
    while(1){
        scanf("%d",&n);
//        start = clock(); // ????§???????
        if(n == 0)break;
        for(i = n;0 <= i;i--){
            if (isprime(i) == 1 && isprime(i-2)) break;
            p1 = i-2;
            q1 = i;
        }
//        now = clock(); // ????????????
//        printf("%f\n", (double)(now - start) / CLOCKS_PER_SEC);//??¬???
        printf("%d %d\n",p1,q1);
    }
}

Compiler output:
a.cc:1:10: fatal error: stdio.h.h: No such file or directory
    1 | #include "stdio.h.h"
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

#include<stdio.h>

int main(){
  const int MAX_V = 100000;
  int prime[MAX_V+1];
  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;
      }
    }
  }
  while(scanf("%d", &v) != EOF){
    if(v == 0) break;
    for(k = n; k >= 2; k--){
      ans = prime[k];
      if(ans == 1){
        dif = prime[k - 2];
        if(dif == 1){
          printf("%d %d\n", k - 2, k);
          break;
        }
      }
    }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'n' was not declared in this scope
   19 |     for(k = n; k >= 2; k--){
      |             ^
a.cc:20:7: error: 'ans' was not declared in this scope
   20 |       ans = prime[k];
      |       ^~~
a.cc:22:9: error: 'dif' was not declared in this scope
   22 |         dif = prime[k - 2];
      |         ^~~
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<stdio.h>

int main(){
  const int MAX_V = 100000;
  int prime[MAX_V+1];
  int i, k, v, ans, dif;
  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;
      }
    }
  }
  while(scanf("%d", &v) != EOF){
    if(v == 0) break;
    for(k = n; k >= 2; k--){
      ans = prime[k];
      if(ans == 1){
        dif = prime[k - 2];
        if(dif == 1){
          printf("%d %d\n", k - 2, k);
          break;
        }
      }
    }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: 'n' was not declared in this scope
   19 |     for(k = n; k >= 2; k--){
      |             ^
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<stdio.h>

int main(){
  const int MAX_V = 100000;
  int prime[MAX_V+1];
  int i, k, v, ans, dif;
  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;
      }
    }
  }
  while(scanf("%d", &v) != EOF){
    if(v == 0) break;
    for(k = v; k >= 2; k--){
      ans = prime[k];
      if(ans == 1){
        dif = prime[k - 2];
        if(dif == 1){
          printf("%d %d\n", k - 2, k);
          break;
        }
      }
    }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<stdio.h>

int main(){
  const int MAX_V = 100000;
  int prime[MAX_V+1];
  int i, k, v, ans, dif;
  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;
      }
    }
  }
  while(scanf("%d", &v) != EOF){
    if(v == 0) break;
    for(k = v; k >= 2; k--){
      ans = prime[k];
      if(ans == 0){
        dif = prime[k - 2];
        if(dif == 0){
          printf("%d %d\n", k - 2, k);
          break;
        }
      }
    }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^