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

main(){int l[4][2]={0},i;float a;for(i=0;scanf("%f",&a)+1;i++)a<0.2?l[3][i%2]++:(a<0.6?l[2][i%2]++:(a<1.1?l[1][i%2]++:l[0][i%2]++));for(i=0;i<4;)printf("%d %d\n",l[i++][0],l[i][1]);}

Compiler output:
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | main(){int l[4][2]={0},i;float a;for(i=0;scanf("%f",&a)+1;i++)a<0.2?l[3][i%2]++:(a<0.6?l[2][i%2]++:(a<1.1?l[1][i%2]++:l[0][i%2]++));for(i=0;i<4;)printf("%d %d\n",l[i++][0],l[i][1]);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:1:42: error: 'scanf' was not declared in this scope
    1 | main(){int l[4][2]={0},i;float a;for(i=0;scanf("%f",&a)+1;i++)a<0.2?l[3][i%2]++:(a<0.6?l[2][i%2]++:(a<1.1?l[1][i%2]++:l[0][i%2]++));for(i=0;i<4;)printf("%d %d\n",l[i++][0],l[i][1]);}
      |                                          ^~~~~
a.cc:1:146: error: 'printf' was not declared in this scope
    1 | main(){int l[4][2]={0},i;float a;for(i=0;scanf("%f",&a)+1;i++)a<0.2?l[3][i%2]++:(a<0.6?l[2][i%2]++:(a<1.1?l[1][i%2]++:l[0][i%2]++));for(i=0;i<4;)printf("%d %d\n",l[i++][0],l[i][1]);}
      |                                                                                                                                                  ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | main(){int l[4][2]={0},i;float a;for(i=0;scanf("%f",&a)+1;i++)a<0.2?l[3][i%2]++:(a<0.6?l[2][i%2]++:(a<1.1?l[1][i%2]++:l[0][i%2]++));for(i=0;i<4;)printf("%d %d\n",l[i++][0],l[i][1]);}
Language: C++

#include<stdio.h>
int main(void)
{
	double h,m;
	int cMA,cHA;
	int cMB,cHB;
	int cMC,cHC;
	int cMD,cHD;
	cMA=0;
	cHA=0;
	cMB=0;
	cHB=0;
	cMC=0;
	cHC=0;
	cMD=0;
	cHD=0;
		while(scanf("%lf %lf",&h,&m)!=EOF){
			if(h>=1.1){
				cHA++;
			}
			else if(0.6<=h){
				cHB++;
			}
			else if(0.2<=h){
				cHC++;
			}
			else{
				cHD++;
			}
			if(m>=1.1){
				cMA++;
			}
			else if(0.6<=m m<1.1){
				cMB++;
			}
			else if(0.2<=m && m<0.6){
				cMC++;
			}
			else if(0.2>m){
				cMD++;
			}
		}
	printf("%d %d\n%d %d\n%d %d\n%d %d\n",cHA,cMA,cHB,cMB,cHC,cMC,cHD,cMD);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:39: error: expected ')' before 'm'
   33 |                         else if(0.6<=m m<1.1){
      |                                ~      ^~
      |                                       )
Language: C++

include <iostream>
#include <stdio.h>

using namespace std;
 int an[4][2],n,i,j;
 int main() {
  double ey[2];
  while(cin >> ey[0] >> ey[1]) {
	  for (i=0;i<2;i++) {
		  if (ey[i]>=1.1) j=0;
		  if (ey[i]>=0.6 && ey[i]<1.1) j=1;
		  if (ey[i]>=0.2 && ey[i]<0.6) j=2;
		  if (ey[i]<0.2) j=3;
		  an[j][i]++;
	  }
   }
  for (i=0;i<4;i++) cout << an[i][0] << ' ' << an[i][1] << endl;
  return 0;
 }

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |   while(cin >> ey[0] >> ey[1]) {
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <stdio.h>
  +++ |+#include <iostream>
    3 | 
a.cc:17:21: error: 'cout' was not declared in this scope
   17 |   for (i=0;i<4;i++) cout << an[i][0] << ' ' << an[i][1] << endl;
      |                     ^~~~
a.cc:17:21: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:60: error: 'endl' was not declared in this scope
   17 |   for (i=0;i<4;i++) cout << an[i][0] << ' ' << an[i][1] << endl;
      |                                                            ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <stdio.h>
  +++ |+#include <ostream>
    3 |
Language: Java

import java.util.Scanner;

public class Q4 {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int a = s.nextInt();
		boolean judge = true;
		int count = 0;
		int so[] = new int[a];
		int Max = 0; int Max2 = 0;
		
		for(int num = 2; num < a; num++){
			for(int i = 2; i < num; i++){
				if(num % i == 0){
					judge = false;
					break;
				}
			}
			if(judge){
				//System.out.print(num + " ");
				so[count] = num;
				count++;
			}
			judge = true;
		}
		

		
		for(int i = 1; i< count; i++){
			int check = so[i-1] + 2;
			if(check == so[i]){
				Max = so[i-1];
				Max2 = so[i];
			}
		}
		System.out.println(Max + " " + Max2);
	}
}

Compiler output:
Main.java:3: error: class Q4 is public, should be declared in a file named Q4.java
public class Q4 {
       ^
1 error
Language: Java

import java.util.Scanner;

public class TestX {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		
		while (true) {
			int a = s.nextInt();
			if(a == 0) break;
			boolean judge = true;
			int count = 0;
			int so[] = new int[a];
			int Max = 0;
			int Max2 = 0;
			for (int num = 2; num < a; num++) {
				for (int i = 2; i < num; i++) {
					if (num % i == 0) {
						judge = false;
						break;
					}
				}
				if (judge) {
					//System.out.print(num + " ");
					so[count] = num;
					count++;
				}
				judge = true;
			}
			for (int i = 1; i < count; i++) {
				int check = so[i - 1] + 2;
				if (check == so[i]) {
					Max = so[i - 1];
					Max2 = so[i];
				}
			}
			System.out.println(Max + " " + Max2);
		}
	}
}

Compiler output:
Main.java:3: error: class TestX is public, should be declared in a file named TestX.java
public class TestX {
       ^
1 error
Language: Java

import java.util.Scanner;
  
public class sample {
  
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
          
        int a = 0,i,j,b=0;
        int[] data= new int [10001];
        /*for(i=2;i<=10000;i++){
        	data[i]=0;
        }*/
        for(i=2;i<=10000;i++){
        	if(data[i]==0){
        		for(j=2;i*j<=10000;j++){
        			data[i*j]=1;
        		}
        	}
        }
        
        			
        		
          
          while(b!=1){
        	  a += sc.nextInt();
          if(a==0)break;
       for(i=a;i>=2;i--){
    	   if(data[i]==0&&data[i-2]==0){
    		   System.out.println( +data[i-2]);System.out.println(+data[i]);
    		   
    		   break;
    	   }
       }
          }
          
       
       
          
    }
}

        

Compiler output:
Main.java:3: error: class sample is public, should be declared in a file named sample.java
public class sample {
       ^
1 error
Language: Java

import java.util.Scanner;
  
public class sample {
  
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
          
        int a = 0,i,j,b=0,k=0;
        System.out.println("\u0047"+"\u004F");
        int[] data= new int [10001];
        char ku=' ';
        
   
        for(i=2;i<=10000;i++){
        	if(data[i]==0){
        		for(j=2;i*j<=10000;j++){
        			data[i*j]=1;
        		}
        	}
        }
      
        
        			
        		
          
          while(b!=1){
        	  a=0;
        	  a += sc.nextInt();
          if(a==0){
        	  break;
          }
          
       for(i=a;i>=3;i--){
    	   if(data[i]==0&&data[i-2]==0){
    		   System.out.println(+i-2+" "+i+"\n");
    		   break;
    	   }
       }
   }
          
       
       
          
    }
}

Compiler output:
Main.java:3: error: class sample is public, should be declared in a file named sample.java
public class sample {
       ^
1 error
Language: Java

import java.util.Scanner;
  
public class Twin Prime {
  
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
          
        int a = 0,i,j,b=0,k=0;
        System.out.println("\u0047"+"\u004F");
        int[] data= new int [10001];
        char ku=' ';
        
   
        for(i=2;i<=10000;i++){
        	if(data[i]==0){
        		for(j=2;i*j<=10000;j++){
        			data[i*j]=1;
        		}
        	}
        }
      
        
        			
        		
          
          while(b!=1){
        	  a=0;
        	  a += sc.nextInt();
          if(a==0){
        	  break;
          }
          
       for(i=a;i>=3;i--){
    	   if(data[i]==0&&data[i-2]==0){
    		   System.out.println(+i-2+" "+i+"\n");
    		   break;
    	   }
       }
   }
          
       
       
          
    }
}

Compiler output:
Main.java:3: error: '{' expected
public class Twin Prime {
                 ^
1 error
Language: Java

import java.util.Scanner;
  
Public class sample {
  
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
          
        int a = 0,i,j,b=0,k=0;
       
        int[] data= new int [10001];
        char ku=' ';
        
   
        for(i=2;i<=10000;i++){
        	if(data[i]==0){
        		for(j=2;i*j<=10000;j++){
        			data[i*j]=1;
        		}
        	}
        }
      
        
        			
        		
          
          while(b!=1){
        	  a=0;
        	  a += sc.nextInt();
          if(a==0){
        	  break;
          }
          
       for(i=a;i>=3;i--){
    	   if(data[i]==0&&data[i-2]==0){
    		   System.out.println(+i-2+" "+i+"\n");
    		   break;
    	   }
       }
   }
          
       
       
          
    }
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
Public class sample {
^
1 error
Language: Java

import java.util.Scanner;
  
Public class twin prime {
  
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
          
        int a = 0,i,j,b=0,k=0;
       
        int[] data= new int [10001];
        char ku=' ';
        
   
        for(i=2;i<=10000;i++){
        	if(data[i]==0){
        		for(j=2;i*j<=10000;j++){
        			data[i*j]=1;
        		}
        	}
        }
      
        
        			
        		
          
          while(b!=1){
        	  a=0;
        	  a += sc.nextInt();
          if(a==0){
        	  break;
          }
          
       for(i=a;i>=3;i--){
    	   if(data[i]==0&&data[i-2]==0){
    		   System.out.println(+i-2+" "+i+"\n");
    		   break;
    	   }
       }
   }
          
       
       
          
    }
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
Public class twin prime {
^
Main.java:3: error: '{' expected
Public class twin prime {
                 ^
2 errors
Language: Java

import java.util.Scanner;
  
Public class twin {
  
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
          
        int a = 0,i,j,b=0,k=0;
       
        int[] data= new int [10001];
        char ku=' ';
        
   
        for(i=2;i<=10000;i++){
        	if(data[i]==0){
        		for(j=2;i*j<=10000;j++){
        			data[i*j]=1;
        		}
        	}
        }
      
        
        			
        		
          
          while(b!=1){
        	  a=0;
        	  a += sc.nextInt();
          if(a==0){
        	  break;
          }
          
       for(i=a;i>=3;i--){
    	   if(data[i]==0&&data[i-2]==0){
    		   System.out.println(+i-2+" "+i+"\n");
    		   break;
    	   }
       }
   }
          
       
       
          
    }
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
Public class twin {
^
1 error
Language: Java

import java.util.Scanner;
  
public class main {
  
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
          
        int a = 0,i,j,b=0,k=0;
       
        int[] data= new int [10001];
        char ku=' ';
        
   
        for(i=2;i<=10000;i++){
        	if(data[i]==0){
        		for(j=2;i*j<=10000;j++){
        			data[i*j]=1;
        		}
        	}
        }
      
        
        			
        		
          
          while(b!=1){
        	  a=0;
        	  a += sc.nextInt();
          if(a==0){
        	  break;
          }
          
       for(i=a;i>=3;i--){
    	   if(data[i]==0&&data[i-2]==0){
    		   System.out.println(+i-2+" "+i+"\n");
    		   break;
    	   }
       }
   }
          
       
       
          
    }
}

Compiler output:
Main.java:3: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: C

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

int isprime(int x){
	int i, k=1;
	
	for(i=3; i<=1sqrt(x); i++){
		if(x%i==0) {
			k=0;
			break;
		}
	}

	return k;
}

int main(void){
	while(1){
		int n;
		scanf(" %d", &n);
		if(n==0) break;
		if(n%2 == 0) n--;
		
		while(isprime(n) != 1 || isprime(n-2) != 1){
			n-=2;
		}
		
		printf("%d %d\n", n-2, n);
	}

	return 0;
}

Compiler output:
main.c: In function 'isprime':
main.c:7:21: error: invalid suffix "sqrt" on integer constant
    7 |         for(i=3; i<=1sqrt(x); i++){
      |                     ^~~~~
Language: C

#include <stdio.h>

const int max = 10000; //素数表最大数
int prime[max + 1]; //素数表配列
int idx, idx2, tmp;

void list(); //素数表作成
void judge(int n); //双子素数判定

int main(){
    
    int n;
    
    list();
    
    while (scanf("%d", &n)){
        if (n == 0) break;
        judge(n);
        printf("%d %d\n", idx2, idx);
    }
    
    return 0;
}

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

void judge(int n){
    int i;
    for (i = n; 0 < n; i--){
        tmp = i - 2;
        if(prime[i]){
            if(prime[tmp]){
                idx = i;
                idx2 = tmp;
                break;
            }
        }
    }
}

Compiler output:
main.c:4:5: error: variably modified 'prime' at file scope
    4 | int prime[max + 1]; //素数表配列
      |     ^~~~~
Language: C

#include <stdio.h>

const int max = 10000; //素数表最大数
int prime[max + 1]; //素数表配列
int idx, idx2, tmp;

void list(void); //素数表作成
void judge(int n); //双子素数判定

int main(){
    
    int n;
    
    list();
    
    while (scanf("%d", &n)){
        if (n == 0) break;
        judge(n);
        printf("%d %d\n", idx2, idx);
    }
    
    return 0;
}

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

void judge(int n){
    int i;
    for (i = n; 0 < n; i--){
        tmp = i - 2;
        if(prime[i]){
            if(prime[tmp]){
                idx = i;
                idx2 = tmp;
                break;
            }
        }
    }
}

Compiler output:
main.c:4:5: error: variably modified 'prime' at file scope
    4 | int prime[max + 1]; //素数表配列
      |     ^~~~~
Language: C

#include <stdio.h>
#include <math.h>
#include <string>
int isprime(int n) {
	int i;
	if(n<=1){
		return 0;
	}
	for(i = 2; i*i<=n; i++) {
		if(n % i == 0){
			return 0;
		}
	}
	return 1;
}

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

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

#include <stdio.h>

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

int main() {
	int i, k, n;
	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", &n) = 0) {
		for( i = n; i > 1; i--) {
			if(isprime(i) == 1 && isprime(i - 2) == 1) break;
		}
		p1 = i - 2;
		q1 = i;
		printf("%d %d\n", p1, q1);
	}
	return 0;
}

Compiler output:
main.c:3:7: error: unknown type name 'in'; did you mean 'int'?
    3 | const in MAX_V = 10000;
      |       ^~
      |       int
main.c:4:5: error: variably modified 'prime' at file scope
    4 | int prime[MAX_V + 1];
      |     ^~~~~
main.c: In function 'main':
main.c:18:31: error: lvalue required as left operand of assignment
   18 |         while(scanf("%d", &n) = 0) {
      |                               ^
main.c:20:28: error: implicit declaration of function 'isprime' [-Wimplicit-function-declaration]
   20 |                         if(isprime(i) == 1 && isprime(i - 2) == 1) break;
      |                            ^~~~~~~
main.c:22:17: error: 'p1' undeclared (first use in this function)
   22 |                 p1 = i - 2;
      |                 ^~
main.c:22:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:17: error: 'q1' undeclared (first use in this function)
   23 |                 q1 = i;
      |                 ^~
Language: C

#include <stdio.h>
int isprime(int n) {
  int i;
  for(i = 2; i * i <= n; i++) {
    if(n % i == 0) return 0;
  }
  return 1;
}

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

Compiler output:
main.c: In function 'main':
main.c:13:18: error: 'n' undeclared (first use in this function)
   13 |     scanf("%d", &n);
      |                  ^
main.c:13:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:54: error: assignment to expression with array type
   16 |       if(isprime(k) == 1 && isprime(k - 2) == 1) max = k;
      |                                                      ^
Language: C

#include <stdio.h>
int isprime(int n) {
  int i;
  for(i = 2; i * i <= n; i++) {
    if(n % i == 0) return 0;
  }
  return 1;
}

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

Compiler output:
main.c: In function 'main':
main.c:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
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 isprime(int n){
  for(int i = 2; i * i <= n; i++){
    if(n % i == 0) return 0;
  }
  return 1;
 }


int	main(){
	int	n,	i,	cnt	=	0,	max	=	0,	data[100000];
	while(1){
	  cnt=0;
	  max=0;
	  scanf("%d",	&n);
	  if(n==0) break;
	  for(i	=	0;	i	<=	n;	i++){
		  if(isprime(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:
/usr/bin/ld: /tmp/cceRsCak.o: in function `Prime':
main.c:(.text+0x72): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

#include<stdio.h>
const int MAX_V = 10000;
int prime[MAX_V+1];
int main(void){
    int i,k,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;
        for(i = n; i >= 2; i --){
            if(prime[i] == 1 && prime[i-2] == 1){
                q1 = i;
                p1 = i - 2;
                printf("%d %d\n",p1,q1);
                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; // 1??????????????°??´???°??¨?????????
int prime[MAX_V+1]; // 1???????´???°,0???????´???°????????°???????
int main(){
	int i, k, n =10, cnt = 0;
	int border[10];
	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?????\?????°??????°??°??´???°????????°???????
				//printf("prime[%d]=%d\n", k, prime[k]); // ???????????°??¨
			}
		}
	}
	//printf("cnt = %d\n", cnt); // ???????????°??¨
	
	int difference[MAX_V+1];
	int idx = 2;
	for( i = 2; i < MAX_V; i++){ // ?????????????´???°??¨??????????±??????¨?????????
		if(prime[i] == 1){
			difference[i] = i - idx;
			idx = i;
			//printf("difference[%d]=%d\n", i, difference[i]); // ???????????°??¨
		}
	}
	
	for( i = 0; i < n; i++){ // ?????¶?????\?????????
		scanf("%d", &border[i]);
		if(border[i] == 0) break;
		cnt++;
		//printf("border[%d]=%d\n", i, border[i]); // ???????????°??¨
	}
	
	int max[10] = {0};
	for( i = 0; i < cnt; i++){ // ?????¶??\?????????????´???°????????§???????????????????´???????
		for( k = 2; k <= border[i]; k++){
			if( difference[k] == 2 && k > max[i]){
				max[i] = k;
				//printf("max[%d] = %d\n", i, max[i]); // ???????????°??¨
			}
		}
	}
	for( i = 0; i < cnt; i++){ // ???????????????
		printf("%d %d\n", max[i] - 2, max[i]);
	}
	return 0;
}

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

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

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

#include <iostream>

using namespace std;

int main(){
    bool numbers[10001];
    for(int i=0; i<10001; i++) {
        numbers[i] = false;
    }
    numbers[2] = true;
    numbers[3] = true;
    for(int i=5; i<10001; i+=2) {
        if(i % 3 != 0)
            numbers[i] = true;
    }
    int p = 5;
    int num = 0;
    while(true) {
        while(true) {
            if(numbers[p]) break ;
            p++;
        }
        for(int i=10000; i>0; i--) {
            if(!numbers[i]) {
                num = i;
                break ;
            }
        }
        if(p*p > num) break ;
        for(int i=p+1; i<10001; i++) {
            if(i % p == 0) numbers[i] = false;
        }
        p++;
    }

    int n;
    while(cin >> n, n != 0) {
        for( ; n>=5; n--) {
            if(numbers[n] && numbers[n-2]) {
                cout << n - 2 << " " << n << 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<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:
main.c: In function 'main':
main.c:27:46: error: expected ')' before 'if'
   27 |                 if( border[i] <5 || border[i]
      |                   ~                          ^
      |                                              )
   28 |                 if(border[i] == 0) break;
      |                 ~~                            
main.c:30:9: error: expected expression before '}' token
   30 |         }
      |         ^
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(1){
        scanf("%d", &v);
        for(i = v; i > 1; i--){
            if(prime[i] == 1 && prime[i-2] == 1){
                printf("%d %d\n", i-2, i);
                break;
            }
        }
        if(v == 0 || v == 1)break;
    }
    
    return 0;
}

Compiler output:
main.c:6:5: error: variably modified 'prime' at file scope
    6 | 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,n,j,i1 = 0,i2 = 0,max = 0,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;
    }
    for(j = 0;j + 2 < n;j++){
      int isprime = prime[j];
      int isprime2 = prime[j + 2];
      if(isprime) i1 = 1;else i1 = 0;
      if(isprime2) i2 = 1;else i2 = 0;
      if(i1 == 1 && i2 == 1){
        max = j;
      }
    }
    p1 = max;
    q1 = max + 2;
    printf("%d %d\n",p1,q1);
  }
  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<n;i++){
		if(n%i==0){
			return 0;
		} else {
			return 1;
		}
	}
}
int main(){
	int p1=0,q1=0,n,i,prime[1000000],x=0,y=0;
	for(i=3;i<1000000;i++){
		prime[i]=isprime(i);
	}
	while(1){
		scanf("%d",&n);
		if(n==0){
			break;
		}
		for(i=n;i>=3;i--;){
			if(data[i]==1&&data[i-2]==1){
				printf("%d %d\n",i-2,i);
				break;
			}
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:33: error: expected ')' before ';' token
   22 |                 for(i=n;i>=3;i--;){
      |                    ~            ^
      |                                 )
main.c:23:28: error: 'data' undeclared (first use in this function)
   23 |                         if(data[i]==1&&data[i-2]==1){
      |                            ^~~~
main.c:23:28: 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<n;i++){
		if(n%i==0){
			return 0;
		} else {
			return 1;
		}
	}
}
int main(){
	int n,i,prime[1000000];
	for(i=3;i<1000000;i++){
		prime[i]=isprime(i);
	}
	while(1){
		scanf("%d",&n);
		if(n==0){
			break;
		}
		for(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: In function 'main':
main.c:22:33: error: expected ')' before ';' token
   22 |                 for(i=n;i>=3;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:
main.c: In function 'main':
main.c:18:35: error: subscripted value is neither array nor pointer nor vector
   18 |                         if(isprime[i]==1&&isprime[i-2]==1){
      |                                   ^
main.c:18:50: error: subscripted value is neither array nor pointer nor vector
   18 |                         if(isprime[i]==1&&isprime[i-2]==1){
      |                                                  ^
Language: C

#include <stdio.h>

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

int main(void)
{
	int i, k, v,n;
	for (i = 2; i <= MAX_V; i++){
		p[i] = 1;
	}
	for (i = 2; i*i <= MAX_V; i++){
		if (p[i]){
			for (k = 2 * i; k <= MAX_V; k += i){
				p[k] = 0;
			}
		}
	}
	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);
	}
}

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

#include <stdio.h>

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

int main(void)
{
	int i, k, v,n;
	for (i = 0; i <= MAX_V; i++){
		p[i] = 1;
	}
	for (i = 2; i*i <= MAX_V; i++){
		if (p[i]){
			for (k = 2 * i; k <= MAX_V; k += i){
				p[k] = 0;
			}
		}
	}
	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);
	}
}

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



#include <stdio.h>

int p[10001];

int main(void)
{
  	unsigned i,k, n;
  	for (i = 0; i < 10000; i++){
   		prime[i] = 1; 
 	}
	prime[0] = 0;   
 
 	for (i = 2; i*i <= 10000; i++) {
    	if (p[i] == 1) {
     		for (k = 2*i; k <=10000 ; k += i){
        		p[k] = 0;  
  			}
		}
	}
	
	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:
main.c: In function 'main':
main.c:11:17: error: 'prime' undeclared (first use in this function)
   11 |                 prime[i] = 1;
      |                 ^~~~~
main.c:11:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C



#include <stdio.h>

int p[10001];

int main(void)
{
  	unsigned i,k, n;
  	for (i = 0; i < 10000; i++){
   		p[i] = 1; 
 	}
	prime[0] = 0;   
 
 	for (i = 2; i*i <= 10000; i++) {
    	if (p[i] == 1) {
     		for (k = 2*i; k <=10000 ; k += i){
        		p[k] = 0;  
  			}
		}
	}
	
	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:
main.c: In function 'main':
main.c:13:9: error: 'prime' undeclared (first use in this function)
   13 |         prime[0] = 0;
      |         ^~~~~
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h> 

const int MAX_V = 1000000;
int p[MAX_V+1];
int main(){
    int i,k,v,a=0,b=0;
    for(i = 2;i<=MAX_V;i++){
        p[i] = 1;
    }
    for(i = 0;i*i<=MAX_V;i++){
        if(p[i]){
            for(k = 2*i;k<=MAX_V;k +=i){
                p[k] = 0;
            }
        }
    }
    while(1) {
        scanf("%d", &v);
        for( i = 1; i <= v; i++) {
            if(p[i] == 1 && p[i - 2] == 1){
                a = i - 2;
                b = i;
            }
        }
        printf("%d %d\n",a,b);
    }
    return 0;
}

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

#include <stdio.h> 

const int MAX_V = 1000000;
int p[MAX_V+1];
int main(){
    int i,k,v,a=0,b=0;
    for(i = 2;i<=MAX_V;i++){
        p[i] = 1;
    }
    for(i = 0;i*i<=MAX_V;i++){
        if(p[i]){
            for(k = 2*i;k<=MAX_V;k +=i){
                p[k] = 0;
            }
        }
    }
    while(1) {
        scanf("%d", &v);
        if(v == 0){
            printf("end");
            break;
        }
        for( i = 1; i <= v; i++) {
            if(p[i] == 1 && p[i - 2] == 1){
                a = i - 2;
                b = i;
            }
        }
        printf("%d %d\n",a,b);
    }
    return 0;
}

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

#include <stdio.h> 

const int MAX_V = 1000000;
int p[MAX_V+1];
int main(){
    int i,k,v,a = 0,b = 0;
    for(i = 2;i<=MAX_V;i++){
        p[i] = 1;
    }
    for(i = 0;i*i<=MAX_V;i++){
        if(p[i]){
            for(k = 2*i;k<=MAX_V;k +=i){
                p[k] = 0;
            }
        }
    }
    while(1) {
        scanf("%d", &v);
        for( i = 1; i <= v; i++) {
            if(p[i] == 1 && p[i - 2] == 1){
                a = i - 2;
                b = i;
            }
        }
        printf("%d %d\n",a,b);
    }
    return 0;
}

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

#include <stdio.h> 

const int MAX_V = 1000000;
int p[MAX_V+1];
int main(){
    int i,k,v,a = 0,b = 0;
    for(i = 2;i<=MAX_V;i++){
        p[i] = 1;
    }
    for(i = 0;i*i<=MAX_V;i++){
        if(p[i]){
            for(k = 2*i;k<=MAX_V;k +=i){
                p[k] = 0;
            }
        }
    }
    while(1) {
        scanf("%d", &v);
        if(v == 0) break;
        for( i = 1; i <= v; i++) {
            if(p[i] == 1 && p[i - 2] == 1){
                a = i - 2;
                b = i;
            }
        }
        printf("%d %d\n",a,b);
    }
    return 0;
}

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

#include <stdio.h> 

const int MAX_V = 1000000;
int p[MAX_V+1];
int main(){
    int i,k;
    for(i = 2;i<=MAX_V;i++){
        p[i] = 1;
    }
    for(i = 0;i*i<=MAX_V;i++){
        if(p[i]){
            for(k = 2*i;k<=MAX_V;k +=i){
                p[k] = 0;
            }
        }
    }
    while(1) {
        int j,v,a = 0,b = 0;
        scanf("%d", &v);
        if(v == 0) break;
        for(j = 1; j <= v; j++) {
            if(p[j] == 1 && p[j - 2] == 1){
                a = j - 2;
                b = j;
            }
        }
        printf("%d %d\n",a,b);
    }
    return 0;
}

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

#include <math.h>
int prime(int n)
{
	int i1, sw, m;
	m 	= (int)sqrt((double)n);
	sw  = (n <= 1) ? 0 : 1;
	for (i1 = 2; i1 <= m && sw > 0; i1++) {
		if (n%i1 == 0)
			sw = 0;
	}
	return sw;
}

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'
/usr/bin/ld: /tmp/cchN72UT.o: in function `prime':
main.c:(.text+0x1f): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>
int main()
{
	int n,i,j,ans,so[10000],k=0,futa[2],akito;
	while(1)//???????????????
	{
		scanf("%d",&n);//??\???
		if(n==0)
		{
			break;
		}
		for(i=n;i>1;i--)//n??????2?????§?????°
		{
			for(j=i-1;j>0;j--)//i??????1?????§?????°
			{
				ans=i%j;//?????????
				if(j==1)//???????????§??\????????±???
				{
					so[k]=i;
					k++;
				}
				if(ans==0)//????????????0??????
					break;
			}
		}
		for(i=0;i<k;i++)
		{
			akito=so[i]-so[i+1];//?´???°??¨?´???°??????
		if(akito==2)//??????2?????£??????
			{
				futa[0]=so[i+1];//?´???°????°?????????????
				futa[1]=so[i];//?´???°?????§????????????
				break;
			}
		}
			printf("%d %d\n",sou[0],sou[1]);//??????
			k=0;//????????????
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:36:42: error: 'sou' undeclared (first use in this function); did you mean 'so'?
   36 |                         printf("%d %d\n",sou[0],sou[1]);//??????
      |                                          ^~~
      |                                          so
main.c:36:42: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
const int MAX_V = 1000000;
int prime[MAX_V+1];
int main() {
    int i, k, v,a=0,n;
    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;
      for(i=0;i<=n-2;i++){
          int isprime = prime[i];
          int isprimex = prime[i+2];
          if(isprime && isprimex){
             if(a<i)a=i;
          }
        }
        printf("%d %d\n",a,a+2);
    }
    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; // 100???????????? ?´???°??¨?????????
int prime[MAX_V+1]; // 1???????´???°???0???????´???°?????? ??????
int isprime(int n)
{
  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?????\??? ?????° ?´???°?????? ??????
         }
      }
    }
  int isprime = prime[n];
  if(isprime) return 1;
  else return 0;
}

int main(void)
{
  int n,i,t=0,MAX=0;
  while(1)
  {
    scanf("%d",&n);
  //  if(isprime(n))printf("OK");
    if(n==0)  break;
    for(i=n;i>0;i--)
    {
      if(isprime(i)==1 && isprime(i-2) == 1)
        {
          MAX=i;
          printf("%d %d\n",MAX-2,MAX);
          break;
        }
    }
  }
}

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

#include<stdio.h>
const int MAX_V = 1000000; 
int prime[MAX_V+1]; 
int isprime(int n)
{
  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 = prime[n];
  if(isprime) return 1;
  else return 0;
}

int main(void)
{
  int n,i,t=0,MAX=0;
  while(1)
  {
    scanf("%d",&n);
  //  if(isprime(n))printf("OK");
    if(n==0)  break;
    for(i=n;i>0;i--)
    {
      if(isprime(i)==1 && isprime(i-2) == 1)
        {
          MAX=i;
          printf("%d %d\n",MAX-2,MAX);
          break;
        }
    }
  }
}

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 isprime(int n)
{
  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 = prime[n];
  if(isprime) return 1;
  else return 0;
}

int main(void)
{
  int n,i,t=0,MAX=0;
  while(1)
  {
    scanf("%d",&n);
  //  if(isprime(n))printf("OK");
    if(n==0)  break;
    for(i=n;i>0;i--)
    {
      if(isprime(i)==1 && isprime(i-2) == 1)
        {
          MAX=i;
          printf("%d %d\n",MAX-2,MAX);
          break;
        }
    }
  }
}

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, n;
  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", &n) != EOF){
    for(i = n;i > 0;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>

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

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

Compiler output:
main.c:25:10: error: expected declaration specifiers or '...' before string constant
   25 |   printf("%d %d\n", max - 2, max);
      |          ^~~~~~~~~
main.c:25:21: error: unknown type name 'max'
   25 |   printf("%d %d\n", max - 2, max);
      |                     ^~~
main.c:25:30: error: unknown type name 'max'
   25 |   printf("%d %d\n", max - 2, max);
      |                              ^~~
main.c:26:3: error: expected identifier or '(' before 'return'
   26 |   return 0;
      |   ^~~~~~
main.c:27:1: error: expected identifier or '(' before '}' token
   27 | }
      | ^
Language: C

#include <stdio.h>

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

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

Compiler output:
main.c:27:9: error: expected identifier or '(' before '}' token
   27 |         }
      |         ^
main.c:28:7: error: expected identifier or '(' before '}' token
   28 |       }
      |       ^
main.c:29:5: error: expected identifier or '(' before '}' token
   29 |     }
      |     ^
main.c:30:3: error: expected identifier or '(' before '}' token
   30 |   }
      |   ^
main.c:31:10: error: expected declaration specifiers or '...' before string constant
   31 |   printf("%d %d\n", max - 2, max);
      |          ^~~~~~~~~
main.c:31:21: error: unknown type name 'max'
   31 |   printf("%d %d\n", max - 2, max);
      |                     ^~~
main.c:31:30: error: unknown type name 'max'
   31 |   printf("%d %d\n", max - 2, max);
      |                              ^~~
main.c:32:3: error: expected identifier or '(' before 'return'
   32 |   return 0;
      |   ^~~~~~
main.c:33:1: error: expected identifier or '(' before '}' token
   33 | }
      | ^
Language: C

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

Compiler output:
main.c:2:23: error: expected ']' 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:7:26: error: expected expression before ';' token
    7 |     for(i = 2; i <= MAX_V; i++){
      |                          ^
main.c:8:9: error: 'prime' undeclared (first use in this function)
    8 |         prime[i] = 1;
      |         ^~~~~
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:30: error: expected expression before ';' token
   10 |     for(i = 2; i * i <= MAX_V; i++){
      |                              ^
main.c:12:35: error: expected expression before ';' token
   12 |             for(k = 2*i;k <= MAX_V; k += i){
      |                                   ^
Language: C

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