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

#include <iostream>
#include <cmath>
using namespace std;
int main(){
  double a,b,n;
  int sum,s,p;
  cin >> a >> b >> n 
    sum = 0;
  for(int i = 1 ; i <= n ; i++){

    s = (a/b)*pow(10,i);
    sum += s%10;
  }
  cout << sum << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: expected ';' before 'sum'
    7 |   cin >> a >> b >> n
      |                     ^
      |                     ;
    8 |     sum = 0;
      |     ~~~
Language: Java

import java.util.*;


public class YOBI {
	Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		new YOBI();
	}
	public YOBI() {
		new aoj0055().doIt();
	}
	class aoj0055{
		void change(int a[]){
			a[3] = 1;
		}
		void doIt() {
			int a[] = {1,2,3,4,5};
			for(int i = 0;i < 5;i++){
				System.out.print(a[i] +" ");
			}
			change(a);
			for(int i = 0;i < 5;i++){
				System.out.print(a[i] +" ");
			}
		}
	}
}

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

import java.io.*;
import java.math.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null){
BigDecimal n=BigDecimal.valueOf(Integer.parseInt(line));
for(int i=0;i<4;i++){
n=n.multiply(BigDecimal.valueOf(2)).divide(BigDecimal.valueOf(3));
}
n=n.multiply(BigDecimal.valueOf(2));
System.out.println(n.floatValue);
}
}
}

Compiler output:
Main.java:14: error: cannot find symbol
System.out.println(n.floatValue);
                    ^
  symbol:   variable floatValue
  location: variable n of type BigDecimal
1 error
Language: Java

import java.io.*;
import java.math.*;
??
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null){
double n=Double.parseDouble(line);
duouble sum=n;
for(int i=0;i<9;i++){
if(i%2==0){
n*=2;
}
else{
n/=3;
}
sum+=n;
}
BigDecimal x=BigDecimal.valueOf(sum);
x=x.setScale(8,BigDecimal.ROUND_HALF_UP);
System.out.println(x);
}
}
}

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

import java.io.*;
import java.math.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null){
double n=Double.parseDouble(line);
duouble sum=n;
for(int i=0;i<9;i++){
if(i%2==0){
n*=2;
}
else{
n/=3;
}
sum+=n;
}
BigDecimal x=BigDecimal.valueOf(sum);
x=x.setScale(8,BigDecimal.ROUND_HALF_UP);
System.out.println(x);
}
}
}

Compiler output:
Main.java:10: error: cannot find symbol
duouble sum=n;
^
  symbol:   class duouble
  location: class Main
Note: Main.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
Language: Java

import java.util.Scanner;
class Main {
public static void main(String...args){
Scanner in = new Scanner(System.in);
while(in.hasNext()) {
double[] s = new double[10];
double ans = 0.0;
double a=in.nextDouble();
d[0]=a;
for(int i=1;i<10;i++){
if(i%2!=0) s[i]=s[i-1]*2;
else s[i]=s[i-1]/3;
ans+=s[i];
}
System.out.println(ans);
}
}
}

Compiler output:
Main.java:9: error: cannot find symbol
d[0]=a;
^
  symbol:   variable d
  location: class Main
1 error
Language: C

#include <stdio.h>

int main(void){
	long double a;
	while(scanf("%lf",&a) != EOF){
		printf("%f\n",a*211/27);
return 0;
}

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

#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  double a,s;
  while(cin>>a){
    s=a;
    for(int i=0;i<4;i++){
      a*=2;
      s+=a;
      a/=3.0;
      s+=a;
    }
    s+=a*2;
    printf("%lf\n",s);
  }
  return 0;
}

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

#include<stdio.h>

int main(void){
    float n,s;
    while (scanf("%f",&n) != EOF){
        s = n;
        for (i = 2;i <= 10;i++){
            if (i % 2 == 0){
                n = n * 2.00f;
                s = s + n;
            }
            else{
                n = n / 3.00f;
                s = s + n;
            }
        }
        printf("%f\n",s);
    }
    return 0;
}

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

#include<math.h>

int main(void)
{
	double a, s,n;
	int i;

	while (scanf("%lf", &a) != EOF) {
		s = a;
		n = a;
		for (i = 2; i <= 10; i++) {
			if (i % 2 == 0) {
				s *= 2.0;
				n += s;
				printf("s = %lf\n",s);
			}
			else {
				s /= 3.0;
				n += s;
				printf("s = %lf\n", s);

			}
		}
		printf("%.8lf\n",n);
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:16: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |         while (scanf("%lf", &a) != EOF) {
      |                ^~~~~
main.c:2:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    1 | #include<math.h>
  +++ |+#include <stdio.h>
    2 | 
main.c:8:16: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |         while (scanf("%lf", &a) != EOF) {
      |                ^~~~~
main.c:8:16: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:36: error: 'EOF' undeclared (first use in this function)
    8 |         while (scanf("%lf", &a) != EOF) {
      |                                    ^~~
main.c:8:36: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:8:36: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:33: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   15 |                                 printf("s = %lf\n",s);
      |                                 ^~~~~~
main.c:15:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:15:33: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:15:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:33: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   20 |                                 printf("s = %lf\n", s);
      |                                 ^~~~~~
main.c:20:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:24:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   24 |                 printf("%.8lf\n",n);
      |                 ^~~~~~
main.c:24:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

main(fenv_t a){for(;~scanf("%lf",&a);)printf("%f\n",a*211/27);}

Compiler output:
main.c:1:6: error: unknown type name 'fenv_t'
    1 | main(fenv_t a){for(;~scanf("%lf",&a);)printf("%f\n",a*211/27);}
      |      ^~~~~~
Language: C

main(){for(float a;~scanf("%f",&a);)printf("%f\n",a*211./27);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){for(float a;~scanf("%f",&a);)printf("%f\n",a*211./27);}
      | ^~~~
main.c: In function 'main':
main.c:1:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(){for(float a;~scanf("%f",&a);)printf("%f\n",a*211./27);}
      |                     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){for(float a;~scanf("%f",&a);)printf("%f\n",a*211./27);}
main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(){for(float a;~scanf("%f",&a);)printf("%f\n",a*211./27);}
      |                     ^~~~~
main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:37: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(){for(float a;~scanf("%f",&a);)printf("%f\n",a*211./27);}
      |                                     ^~~~~~
main.c:1:37: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:37: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:37: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

int main(void){
	double x;

	while(cin>>x){
		double sum = x;
		for(int i=0;i<9;i++){
			if(i % 2 == 0) x *= 2;
			else x /= 3;
			sum += x;
		}

		printf("%.8lf\n",sum);
	}

	return 0;
}

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

main(i,double a){for(;~scanf("%lf",&a);puts(gcvt(a*211/27,9)));}

Compiler output:
main.c:1:8: error: expected ')' before 'double'
    1 | main(i,double a){for(;~scanf("%lf",&a);puts(gcvt(a*211/27,9)));}
      |        ^~~~~~
      |        )
Language: C

i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:3: error: return type defaults to 'int' [-Wimplicit-int]
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      |   ^~~~
main.c: In function 'main':
main.c:1:27: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      |                           ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
main.c:1:27: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      |                           ^~~~~
main.c:1:27: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:43: error: 'EOF' undeclared (first use in this function)
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      |                                           ^~~
main.c:1:43: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:1:43: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:103: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      |                                                                                                       ^~~~~~
main.c:1:103: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:103: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:103: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;}
      | ^~~~
main.c: In function 'main':
main.c:1:22: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;}
      |                      ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;}
main.c:1:22: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;}
      |                      ^~~~~
main.c:1:22: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:39: error: 'EOF' undeclared (first use in this function)
    1 | main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;}
      |                                       ^~~
main.c:1:39: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:1:39: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:44: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;}
      |                                            ^~~~~~
main.c:1:44: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:44: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:44: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;}

Compiler output:
main.c:1:18: warning: extra tokens at end of #include directive
    1 | #include<stdio.h>main(){float x;while(scanf("%lf",&x)!=EOF){printf("%12.f",211*x/27);}return 0;}
      |                  ^~~~
/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<stdio.h>

int main()
{
	double n,a;
	int i;
	while(scanf("%lf",&n)!=EOF)
	{
		a=n;
		for(i=2;i<11;i++)
			a+=(i%2==0?n*=2:n/=3);
		printf("%f\n",a);
	}
}

Compiler output:
main.c: In function 'main':
main.c:11:42: error: lvalue required as left operand of assignment
   11 |                         a+=(i%2==0?n*=2:n/=3);
      |                                          ^~
Language: C

#include<stdio.h>

int main()
{
	double n,a;
	int i;
	while(scanf("%lf",&n)!=EOF)
	{
		a=n;
		for(i=2;i<11;i++)
			a+=(i%2==0?n*=2:n/=3);
		printf("%f\n",a);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:42: error: lvalue required as left operand of assignment
   11 |                         a+=(i%2==0?n*=2:n/=3);
      |                                          ^~
Language: C

#include<stdio.h>

int main()
{
	double n,a;
	int i;
	while(scanf("%lf",&n)!=EOF)
	{
		a=n;
		for(i=2;i<11;i++)
		{
			i%2==0?n*=2:n/=3;
			a+=n;
		}
		printf("%f\n",a);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:38: error: lvalue required as left operand of assignment
   12 |                         i%2==0?n*=2:n/=3;
      |                                      ^~
Language: C

include<stdio.h>
int main(){
  int i;
  double a=0,count=0;
  i=0;

  while(1){

    scanf("%lf",&a);
    count+=a;

    for(;i<9;i++){
      if((i%2)==0){
	count+=a*2.0;
	a=a*2.0;
      }
      else{
	count+=a/3.0;
	a=a/3.0;
      }
    }

    printf("%.8f\n",count);
    count=0;
    i=0;
  }

  return 0;
}

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

#include<cstdio>
 
int main(){
    double sum;
    double a;
    int i;
    while(~scanf("%lf",&a)){
        sum=0;
        sum+=a;
        for(i=2;i<=10;i++){
 
            if(i%2==0){
                a=2*a;
            }else{
                a=a/3;
            }
            sum+=a;
        }
        printf("%f\n",sum);
    }
     
    return 0;
}

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

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

using namespace std;

double a_1;
double s_n;
std::array<double , 10> arr ;

double fib(int i){
  if(i ==1){
  }else if(i % 2 == 0){
    arr[i] = arr[i-1] * 2;
  }else{
    arr[i] = arr[i-1] / 3;
  }
  return arr[i];
}

int main(void){

  std::cin >> a_1;
  arr[1] = a_1;
  scanf("%lf", &a_1);

  for(int i = 1; i <= 10; i++){
    s_n += fib(i);
    if(i == 10){
      printf("%lf", s_n);javascript:void(0)
    }
  }

  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:30:44: error: expected ';' before '}' token
   30 |       printf("%lf", s_n);javascript:void(0)
      |                                            ^
      |                                            ;
   31 |     }
      |     ~
Language: C++


#include <stdio.h>
#include <array>

using namespace std;

double a_1;
double s_n;
array<double , 10> arr ;

double fib(int i){
  if(i ==1){
  }else if(i % 2 == 0){
    arr[i] = arr[i-1] * 2;
  }else{
    arr[i] = arr[i-1] / 3;
  }
  return arr[i];
}

int main(void){

  std::cin >> a_1;
  arr[1] = a_1;
  scanf("%lf", &a_1);

  for(int i = 1; i <= 10; i++){
    s_n += fib(i);
    if(i == 10){
      printf("%lf", s_n);
    }
  }

  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:23:8: error: 'cin' is not a member of 'std'
   23 |   std::cin >> a_1;
      |        ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include <array>
  +++ |+#include <iostream>
    4 |
Language: C++


#include <stdio.h>

using namespace std;

double a_1;
double s_n;
array<double , 10> arr ;

double fib(int i){
  if(i ==1){
  }else if(i % 2 == 0){
    arr[i] = arr[i-1] * 2;
  }else{
    arr[i] = arr[i-1] / 3;
  }
  return arr[i];
}

int main(void){

  std::cin >> a_1;
  arr[1] = a_1;
  scanf("%lf", &a_1);

  for(int i = 1; i <= 10; i++){
    s_n += fib(i);
    if(i == 10){
      printf("%lf", s_n);
    }
  }

  return 0;
}



Compiler output:
a.cc:8:1: error: 'array' does not name a type
    8 | array<double , 10> arr ;
      | ^~~~~
a.cc: In function 'double fib(int)':
a.cc:13:5: error: 'arr' was not declared in this scope
   13 |     arr[i] = arr[i-1] * 2;
      |     ^~~
a.cc:15:5: error: 'arr' was not declared in this scope
   15 |     arr[i] = arr[i-1] / 3;
      |     ^~~
a.cc:17:10: error: 'arr' was not declared in this scope
   17 |   return arr[i];
      |          ^~~
a.cc: In function 'int main()':
a.cc:22:8: error: 'cin' is not a member of 'std'
   22 |   std::cin >> a_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:23:3: error: 'arr' was not declared in this scope
   23 |   arr[1] = a_1;
      |   ^~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
    double n;
    while (cin >> n) {
        double nums[10] = {n};
    
        for(int i=1;i<10;++i) {
            if ((i+1)%2) nums[i] = num[i-1]/3;
            else nums[i] = nums[i-1]*2;
        }
    
        double sum = 0.0;
    
        for(int i=0;i < 10;++i) sum += nums[i];

        cout << sum << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:36: error: 'num' was not declared in this scope; did you mean 'nums'?
   11 |             if ((i+1)%2) nums[i] = num[i-1]/3;
      |                                    ^~~
      |                                    nums
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<string.h>
#include<math.h>
#include<utility>
#include<algorithm>
#include<functional>
using namespace std;
 
  
int main()
{
    
    while(cin>>a)
    {
     double a=0;
    double s=0;
     
    s=a;
    for(int i=0;i<4;i++)
    {
    a=2*a;
    s=s+a;
    a=a/3;
    s=s+a;
 
    }
    s=s+a*2;
    cout<<s<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: 'a' was not declared in this scope
   15 |     while(cin>>a)
      |                ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;
#define int long long
signed main(){
	double a;
	while( scanf("%lf", &a) != EOF ){
		double sum = a;
		for(int i=1;i<10;i++){
			if(i%2 == 0) a /= 3;
			else a *= 2;
			sum += a;
		}
		cout << sum << endl;
	}
	return 0;
}
KAGUYA:AOJ0

Compiler output:
a.cc:18:7: error: found ':' in nested-name-specifier, expected '::'
   18 | KAGUYA:AOJ0
      |       ^
      |       ::
a.cc:18:1: error: 'KAGUYA' does not name a type
   18 | KAGUYA:AOJ0
      | ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<int,int> P;
const ll MOD=1000000007;
const ll INF=1000000010;
const ll LINF=4000000000000000010LL;
const int MAX=310;
const double EPS=1e-9;
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
int main(){
    int b;
    while(cin>>b,b){
        double a[11];
        a[1]=b;
        double sum=b;
        for(int i=2;i<=10;i++){
            if(i%2){
                a[i]=a[i-1]/3;
            }else{
                a[i]=a[i-1]*2;
            }
            sum+=a[i];
        }
        printf("%.9lf\n",sum)
    }   
}



Compiler output:
a.cc: In function 'int main()':
a.cc:27:30: error: expected ';' before '}' token
   27 |         printf("%.9lf\n",sum)
      |                              ^
      |                              ;
   28 |     }
      |     ~
Language: C++

#import<stdlib.h>
main(a){for(;~scanf("%as",&a);)printf("%f\n",atof(a)*211/27);}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<stdlib.h>
      |  ^~~~~~
a.cc:2:5: error: expected constructor, destructor, or type conversion before '(' token
    2 | main(a){for(;~scanf("%as",&a);)printf("%f\n",atof(a)*211/27);}
      |     ^
Language: C++

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

int main(){
  int i,j,n;
  double sum=0,im,im2[1000];

  while(cin >> im){
    sum=0;
    im2[1]=im;
    sum+=im;
    for(i=2;i<=10;i++){
      if(i%2 == 0){
	im2[i]=im2[i-1]*2;
	sum+=im2[i];
      }
      else{
	im2[i]=im2[i-1]/3;
	sum+=im2[i];
      }
      //cout << "im2["<<i<<"] = "<<im2[i]<<endl;

    }

    printf("%.8f\n",sum);

  }

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

i,main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}

Compiler output:
a.cc:1:1: error: 'i' does not name a type
    1 | i,main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      | ^
Language: C++

i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}

Compiler output:
a.cc:1:1: error: 'i' does not name a type
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      | ^
a.cc:1:3: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      |   ^~~~
a.cc: In function 'int main()':
a.cc:1:27: error: 'scanf' was not declared in this scope
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      |                           ^~~~~
a.cc:1:43: error: 'EOF' was not declared in this scope
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      |                                           ^~~
a.cc:1:1: note: 'EOF' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
a.cc:1:56: error: 'i' was not declared in this scope
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      |                                                        ^
a.cc:1:103: error: 'printf' was not declared in this scope
    1 | i;main(){double a,s;while(scanf("%f",&a)!=EOF){s=a;for(i=2;i<=10;i++){if(i%2)a/=3.0;else a*=2.0;s+=a;}printf("%.8f\n",s);}}
      |                                                                                                       ^~~~~~
a.cc:1:103: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
	double n,tmp,sum=0,s[11]
	while(scanf("%lf",&n)!=EOF)
	{
		sum=0;
		tmp = n;
		for(int i=1;i<=10;i++)
		{
			if(i==1)
			{
			}
			else if(i%2==0)
			{
				tmp *=2;
			}
			else
			{
				tmp /=3;
			}
			sum += tmp;
		}
		printf("%.8f",sum);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected initializer before 'while'
    7 |         while(scanf("%lf",&n)!=EOF)
      |         ^~~~~
Language: C++

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

int main(){
  double s[10],num,sum;

    while(cin >> num){
      s[0] = num;
      sum = 0;

      for(int i = 0 ; i < 10 ; i++){
        if((i+1)%2 == 0) s[i] = s[i-1] *2.0;
        else s[i] = s[i-1] / 3.0;
      }

      for(int i = 0 ; i < 10 ; i++) sum += s[i];
      printf("%.8f\n" ,sum);
  }

  return 0;
}

Compiler output:
a.cc:2:10: fatal error: csdio: No such file or directory
    2 | #include <csdio>
      |          ^~~~~~~
compilation terminated.
Language: C++

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

int main(){

  float n;
  while(cin >> n){
    float sum=n;
    for(i=2;i<=10;i++){
      if(i%2 == 0){
        n *= 2.;
      }
      else{
        n /= 3.;
      }
      sum += n;
    }
    cout << sum << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'i' was not declared in this scope
   11 |     for(i=2;i<=10;i++){
      |         ^
Language: Java

import java.io.*;

class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
int count;
boolean p=new boolean[50001];
for(int i=0;i<=50000;i++){
p[i]=true;
}
p[0]=false;
p[1]=false;
for(int i=2;i<=Math.sqrt(50000)+1;i++){
if(p[i]){
for(int j=i+i;j<=50000;j+=i){
p[j]=false;
}
}
}
while(!(line=br.readLine()).equals("0")){
count=0;
int n=Integer.parseInt(line);
for(int i=2;i<=n/2;i++){
if(p[i]&&p[n-i]){
count++;
}
}
System.out.println(count);
}
}
}

Compiler output:
Main.java:8: error: incompatible types: boolean[] cannot be converted to boolean
boolean p=new boolean[50001];
          ^
Main.java:10: error: array required, but boolean found
p[i]=true;
 ^
Main.java:12: error: array required, but boolean found
p[0]=false;
 ^
Main.java:13: error: array required, but boolean found
p[1]=false;
 ^
Main.java:15: error: array required, but boolean found
if(p[i]){
    ^
Main.java:17: error: array required, but boolean found
p[j]=false;
 ^
Main.java:25: error: array required, but boolean found
if(p[i]&&p[n-i]){
    ^
Main.java:25: error: array required, but boolean found
if(p[i]&&p[n-i]){
          ^
8 errors
Language: Java

#include <stdio.h>
int temo[100000];
??
int main(void){
????????int n,i,j,count;
????????for (i=2;i<=50000;i++)temp[i]=1;
????????for (i = 2; i * i <= 50000; i++){
????????????????if (temp[i] == 1){
????????????????????????for (j = i * i; j <= 50000; j += i)temp[j] = 0;
????????????????}
????????}
????????while(1){
????????????????count=0;
????????????????scanf("%d", &n);
????????????????if (n==0)return(0);
????????????????for (i=0;i<=50000;i++){
????????????????????????if (temp[i]==1&&n-i>=i&&temp[n-i]==1){
????????????????????????????????count+=1;
????????????????????????}
????????????????}
????????????????printf("%d\n",count);
????????}
??????????
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:3: error: class, interface, enum, or record expected
??
^
Main.java:6: error: class, interface, enum, or record expected
????????for (i=2;i<=50000;i++)temp[i]=1;
^
Main.java:6: error: class, interface, enum, or record expected
????????for (i=2;i<=50000;i++)temp[i]=1;
                 ^
Main.java:6: error: class, interface, enum, or record expected
????????for (i=2;i<=50000;i++)temp[i]=1;
                          ^
Main.java:7: error: class, interface, enum, or record expected
????????for (i = 2; i * i <= 50000; i++){
^
Main.java:7: error: class, interface, enum, or record expected
????????for (i = 2; i * i <= 50000; i++){
                    ^
Main.java:7: error: class, interface, enum, or record expected
????????for (i = 2; i * i <= 50000; i++){
                                    ^
Main.java:9: error: class, interface, enum, or record expected
????????????????????????for (j = i * i; j <= 50000; j += i)temp[j] = 0;
                                        ^
Main.java:9: error: class, interface, enum, or record expected
????????????????????????for (j = i * i; j <= 50000; j += i)temp[j] = 0;
                                                    ^
Main.java:10: error: class, interface, enum, or record expected
????????????????}
^
Main.java:14: error: class, interface, enum, or record expected
????????????????scanf("%d", &n);
^
Main.java:15: error: class, interface, enum, or record expected
????????????????if (n==0)return(0);
^
Main.java:16: error: class, interface, enum, or record expected
????????????????for (i=0;i<=50000;i++){
^
Main.java:16: error: class, interface, enum, or record expected
????????????????for (i=0;i<=50000;i++){
                         ^
Main.java:16: error: class, interface, enum, or record expected
????????????????for (i=0;i<=50000;i++){
                                  ^
Main.java:19: error: class, interface, enum, or record expected
????????????????????????}
^
Main.java:22: error: class, interface, enum, or record expected
????????}
^
19 errors
Language: Java

#include <stdio.h>
int temo[100000];
??
int main(void){
????????int n;
     inti,j,count;
????????for (i=2;i<=50000;i++)temp[i]=1;
????????for (i = 2; i * i <= 50000; i++){
????????????????if (temp[i]==1){
????????????????????????for (j=i*i;j<= 50000;j+=i)temp[j] = 0;
????????????????}
????????}
????????while(1){
????????????????count=0;
????????????????scanf("%d", &n);
????????????????if (n==0)return(0);
????????????????for (i=0;i<=50000;i++){
????????????????????????if (temp[i]==1&&n-i>=i&&temp[n-i]==1){
????????????????????????????????count+=1;
????????????????????????}
????????????????}
????????????????printf("%d\n",count);
????????}
??????????
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:3: error: class, interface, enum, or record expected
??
^
Main.java:6: error: class, interface, enum, or record expected
     inti,j,count;
     ^
Main.java:7: error: class, interface, enum, or record expected
????????for (i=2;i<=50000;i++)temp[i]=1;
^
Main.java:7: error: class, interface, enum, or record expected
????????for (i=2;i<=50000;i++)temp[i]=1;
                 ^
Main.java:7: error: class, interface, enum, or record expected
????????for (i=2;i<=50000;i++)temp[i]=1;
                          ^
Main.java:8: error: class, interface, enum, or record expected
????????for (i = 2; i * i <= 50000; i++){
^
Main.java:8: error: class, interface, enum, or record expected
????????for (i = 2; i * i <= 50000; i++){
                    ^
Main.java:8: error: class, interface, enum, or record expected
????????for (i = 2; i * i <= 50000; i++){
                                    ^
Main.java:10: error: class, interface, enum, or record expected
????????????????????????for (j=i*i;j<= 50000;j+=i)temp[j] = 0;
                                   ^
Main.java:10: error: class, interface, enum, or record expected
????????????????????????for (j=i*i;j<= 50000;j+=i)temp[j] = 0;
                                             ^
Main.java:11: error: class, interface, enum, or record expected
????????????????}
^
Main.java:15: error: class, interface, enum, or record expected
????????????????scanf("%d", &n);
^
Main.java:16: error: class, interface, enum, or record expected
????????????????if (n==0)return(0);
^
Main.java:17: error: class, interface, enum, or record expected
????????????????for (i=0;i<=50000;i++){
^
Main.java:17: error: class, interface, enum, or record expected
????????????????for (i=0;i<=50000;i++){
                         ^
Main.java:17: error: class, interface, enum, or record expected
????????????????for (i=0;i<=50000;i++){
                                  ^
Main.java:20: error: class, interface, enum, or record expected
????????????????????????}
^
Main.java:23: error: class, interface, enum, or record expected
????????}
^
20 errors
Language: Java

import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);

int n,z = 0,count = 0;
boolean is;

while(sc.hasNextInt()){
n = sc.nextInt();
if(n == 0)break;
int[] N = new int[n];
z = 0;
count = 0;

for(int i = 2; i <= n; i++){
int x = i;
is = true;
for(int j = 2; j < Math.qurt(i ); j++)
if(i % j == 0){
is = false;
break;
}
if(is){
N[z] = i;
z++;
}
}
for(int i = 0; i < n; i++)
for(int j = i; j < n; j++)
if(N[i] + N[j] == n)count++;

System.out.println(count);
}
sc.close();
}
}

Compiler output:
Main.java:20: error: cannot find symbol
for(int j = 2; j < Math.qurt(i ); j++)
                       ^
  symbol:   method qurt(int)
  location: class Math
1 error
Language: Java

public class Main {

	Scanner sc;
	int[] table = new int[ 50001 ];
	int[] prime = new int[ 50001 ];
	int pCounter = 0;

	private Main(){
		sc = new Scanner( System.in );
		table[ 1 ] = 1;
		for( int i = 2; i < table.length; i++ ){
			table[ i ] = 0;
		}
		for( int i = 2; i < table.length; i++ ){
			if( table[ i ] == 1 ){ continue; }
			prime[ pCounter++ ] = i;
			for( int j = i * 2; j < table.length; j += i){
				table[ j ] = 1;
			}
		}
	}

	private void run(){
		while( true ){
			int n = sc.nextInt();
			if( n == 0 ){ break; }
			int counter = 0;

			for( int i = 0; prime[ i ] <= n / 2; i++ ){
				int cN = n - prime[ i ];
				if( table[ cN ] == 0 ){ counter++; }
			}
			System.out.println( counter );
		}
	}
	public static void main( String[] args ){
		new Main().run();
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
	Scanner sc;
	^
  symbol:   class Scanner
  location: class Main
Main.java:9: error: cannot find symbol
		sc = new Scanner( System.in );
		         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;

public Main {
 boolean[] p;
 int MAX = 50001;
 void run() {
  p = new boolean[MAX];
  for(int i=2;i<MAX;i++) if(!p[i]) {
   for(int j=2*i;j<MAX;j+=i) p[j] = true;
  }
  Scanner sc = new Scanner(System.in);
  for(;;) {
   int n = sc.nextInt();
   if( n == 0 ) break;

   int cnt = 0;
   for(int i=2;i<n/2;i++) if(!p[n-i] && !p[i]) cnt++;
   if(n/2 == n-n/2 && !p[n/2]) cnt++;
   System.out.println(cnt);
  }
 }
 public static void main(String[] args) {
  new Main().run();
 }
}

Compiler output:
Main.java:5: error: class, interface, enum, or record expected
public Main {
       ^
Main.java:7: error: unnamed classes are a preview feature and are disabled by default.
 int MAX = 50001;
 ^
  (use --enable-preview to enable unnamed classes)
Main.java:27: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.*;
import static java.util.Arrays.*;
import static java.lang.Math.*;

public class P0056 {
 boolean[] p;
 int MAX = 50001;
 void run() {
  p = new boolean[MAX];
  for(int i=2;i<MAX;i++) if(!p[i]) {
   for(int j=2*i;j<MAX;j+=i) p[j] = true;
  }
  Scanner sc = new Scanner(System.in);
  for(;;) {
   int n = sc.nextInt();
   if( n == 0 ) break;

   int cnt = 0;
   for(int i=2;i<(n+1)/2;i++) if(!p[n-i] && !p[i]) cnt++;
   if(n/2 == n-n/2 && !p[n/2]) cnt++;
   System.out.println(cnt);
  }
 }
 public static void main(String[] args) {
  new P0056().run();
 }
}

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

import java.util.Scanner;

public class _0056 {

	static final int MAX = 50000;
	static boolean[] era = new boolean[MAX+1];
	static{
		era[0]=era[1]=true;
		for (int i = 2; i*i <= MAX ; i++) {
			if(!era[i]) for (int j = i*2; j <=MAX ; j+=i) {
				era[j]=true;
			}
		}
	}


	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int n;
		while((n=scan.nextInt())!=0){
			int k=0;
			for (int i = 2; i <=n/2 ; i++) {
				if(n-i<0) break;
				if(!era[i] && !era[n-i]) k++;
			}
			System.out.println(k);
		}
	}
}

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

public class Main {
	public static void main(String[] arg) {
		boolean[] notPrime = new boolean[50001];
		notPrime[0] = true;
		notPrime[1] = true;
		int primeCount = 50000 - 1;
		for (int i = 4; i <= 50000; i += 2) {
			if (!notPrime[i]) {
				notPrime[i] = true;
				primeCount--;
			}
			final int k = i - 1;
			if (!notPrime[k]) {
				for (int j = k * 2; j <= 50000; j += k) {
					if (!notPrime[j]) {
						notPrime[j] = true;
						primeCount--;
					}
				}
			}
		}
		int[] primes = new int[primeCount];
		primes[0] = 2;
		int index = 1;
		for (int i = 3; i <= 50000; i += 2) {
			if (!notPrime[i]) {
				primes[index++] = i;
			}
		}
		int[] gbc = new int[50001];
		for (int i = 0; i < primes.length; i++) {
			for (int j = i; j < primes.length; j++) {
				int val = primes[i] + primes[j];
				if (val > 50000) {
					break;
				}
				gbc[val]++;
			}
		}

		Scanner in = new Scanner(System.in);
		while (in.hasNext()) {
			int n = in.nextInt();
			if (n != 0) {
				System.out.println(gbc[n]);
			}
		}

	}
}

Compiler output:
Main.java:41: error: cannot find symbol
		Scanner in = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:41: error: cannot find symbol
		Scanner in = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C

#include <stdio.h>
#include <math.h>
#define MAX 55000

int num[MAX], used[MAX];

int main(void){
	int i, j, cnt, n;
	num[1] = 1;
	for(i = 2; i < sqrt(MAX); i++){
		for(j = i; i * j < MAX; j++)	num[i*j] = 1;
	}

	while(1){
		scanf("%d", &n);
		if(n == 0)	break;
		if((n & 1) == 1){
			printf("%d\n", 0);
			continue;
		}
		cnt = 0;
		memset(used, 0, MAX);
		for(i = 2; i < n; i++){
			if(used[i] == 1)	continue;
			if(num[i] != 1 && num[n-i] != 1){
				cnt++;
		

Compiler output:
main.c: In function 'main':
main.c:22:17: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration]
   22 |                 memset(used, 0, MAX);
      |                 ^~~~~~
main.c:3:1: note: include '<string.h>' or provide a declaration of 'memset'
    2 | #include <math.h>
  +++ |+#include <string.h>
    3 | #define MAX 55000
main.c:22:17: warning: incompatible implicit declaration of built-in function 'memset' [-Wbuiltin-declaration-mismatch]
   22 |                 memset(used, 0, MAX);
      |                 ^~~~~~
main.c:22:17: note: include '<string.h>' or provide a declaration of 'memset'
main.c:26:33: error: expected declaration or statement at end of input
   26 |                                 cnt++;
      |                                 ^~~
main.c:26:33: error: expected declaration or statement at end of input
main.c:26:33: error: expected declaration or statement at end of input
main.c:26:33: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
#include<math.h>
#include <stdlib.h>
#include<string.h>
#include<limits.h>

int main(){
	int i,j,n,k,count=0;
	int num[60000]={0};
	int ans[60000]={0};
	
	
	for(i=2;i<51000;i++)num[i]=i;
	for(i=2;i<sqrt(51000);i++){
		for(j=2;j*i<=51000;j++)num[j*i]=0;
	}
	
	//while(1){
	scanf("%d",&n);
		if(n==0)break;
		
	for(i=2,j=0;i<n;i++){
		if(num[i]!=0){
			ans[j]=i;
			j++;
		}
	}
	
	for(i=0;i<=j/2;i++){
		for(k=0;k<j;k++)if(ans[i]+ans[k]==n)count++;
	}
	
	printf("%d\n",count);
		
		j=0;
		count=0;
	//}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:25: error: break statement not within loop or switch
   20 |                 if(n==0)break;
      |                         ^~~~~
Language: C

#include <cstdio>
int main()
{
	int n;
	char prime[50001];
	for(int i = 0; i <= 50000; i++)
		prime[i] = 1;
	prime[0] = 0; prime[1] = 0;
	for(int i = 2; i <= 50000; i++){
		if(!prime[i]) continue;
		for(int j = i + i; j <= 50000; j += i)
			prime[j] = 0;
	}
	while(scanf("%d\n", &n), n){
		int cnt = 0;
		for(int i = 2; i <= n / 2; i++)
			if(prime[i] && prime[n - i])
				cnt++;
		printf("%d\n", cnt);
	}
	return 0;
}

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

#include<stdio.h>
#include<math.h>
int prime_number(int n){
	int prime1[50000], prime2[50000];
	int i, j, k = 0, flag, count = 0,b;

	for (i = 0; i < n; i++)prime1[i] = 1;
	for (i = 4; i < n; i+=2)prime1[i] = 0;
	
	b = sqrt(n);
	for (i = 3; i <= b; i += 2) {
		if (prime1[i]) {
			for (j = 2 * i; j < n; j += i)prime1[j] = 0;
		}
	}
	for (i = 2; i < n; i++) {
		if (prime1[i]) prime2[k++] = i;
	}
	for (i = 0; i < k; i++) {
		for (j = 0; j < k; j++) {
			if (prime2[i] + prime2[j] == n) {
				count++;
				prime2[i] = 0;
			}
		}
	}
	return count;
}

int main(void) {
	int n,count;

	while (1) {
		scanf"%d",&n);
		if (n == 0)break;
		count = 0;

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

Compiler output:
main.c: In function 'main':
main.c:34:22: error: expected ';' before string constant
   34 |                 scanf"%d",&n);
      |                      ^~~~
      |                      ;
main.c:34:29: error: expected statement before ')' token
   34 |                 scanf"%d",&n);
      |                             ^
Language: C

#include<stdio.h>
#include<math.h>
#define SIZE 50000
char primes[SIZE];

int main(){
  int i,j,sq,ne,n;
  sq=sqrt(SIZE)+1;
  for(i=2;i<=25000;i++) primes[i*2-1]=1;
  for(i=3;i<=sq;i+=2){
    ne=SIZE/i+1;
    for(j=2;j<=ne;j++){
      primes[j*i-1]=1;
    }
  }

  do{
    scanf("%d",&n);
    if(n==0) break;
    ne=n/2;
    for(i=1,j=0;i<ne;i++){
      if(primes[i]==0&&primes[n-i-2]==0)
	j++j
    }
    printf("%d\n",j);
  }while(1);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:12: error: expected ';' before 'j'
   23 |         j++j
      |            ^
      |            ;
Language: C

#include <cstdio>
#include <algorithm>
using namespace std;
int main(){
	int i,j,n,num=0,sum=0,x[10000],a=0;
	while(scanf("%d",&n)){
		if(n==0) break;
	for(i=2;i<=n;i++){
		for(j=2;j*j<=n;j++){
		if(i!=j){if(i%j==0){
			num=1; break;}}}
	if(num==0){ x[a]=i;
	a++;}num=0;
	}
	for(i=0;i<=a;i++){
		for(j=0;j<=a;j++){
			if(x[i]+x[j]==n) sum++;
		}
	}if(sum%2==1){
	printf("%d\n",sum/2+1);
	}else{
		printf("%d\n",sum/2);
	}
	sum=0; a=0;
	}
	return 0;
}

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

#include<stdio.h>
int x[5133],i,j,n,num,sum,a;
int main(){
for(i=2;;i++){
for(j=2;j*j<=i;j++){
if(i!=j){if(i%j==0){num=1; break;}}}
if(num==0){x[a]=i; a++;}num=0;
if(a==5133) break;
}
while(1){
scanf("%d",&n);
if(n==0) break;
if(n%2==1){
for(j=0;x[j]<=n;j++){
if(x[j]==n-2) {sum++; break;}
}}
else{
for(i=0;x[i]<=n/2;i++){
for(j=0;x[j]<=n;j++){
if(x[i]+x[j]==n) {sum++; break;}
}}
printf("%d\n",sum);
sum=0;
}
return 0;
}

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

#include <stdio.h>
int prime[100000]={0};
int main(){
  int i,j,k,flag,fl;
  while(1){
    scanf("%d",&i);
    if(i == 0){
      break;
    }
    fl=0;
    for(j=2;j<=i/2;j++){
      for(k=2;k*j<=i;k++){
	prime[j*k]=1;
      }
    }
    for(j=0;j<=i;j++){
      if(prime[j] + prime[] == i){
	fl++;
      }
    }
    printf("%d\n",fl);
  }
  return(0);
}

Compiler output:
main.c: In function 'main':
main.c:17:27: error: expected expression before ']' token
   17 |       if(prime[j] + prime[] == i){
      |                           ^
Language: C

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
 
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<stdarg.h>
#include<malloc.h>


int IsPrime(int);

int p[50001] = {0};

int main()
{
	int i, j, n, s, t, m, count, buf[5200] = {0}, ans;
	for(i=2; i<=50000; i++)
		p[i] = 1;
	j = 0;
	for(i=0; i<=223; i++){
		if(IsPrime(i) == 1){
			buf[j] = i;
			j++;
		}
	}
	for(i=0; i<48; i++){
		for(j=2*buf[i]; j<=50000; j+=buf[i])
			p[j] = 0;
	}
	j = 0;
	for(i=0; i<=50000; i++){
		if(p[i] == 1){
			buf[j] = i;
			j++;
		}
	}

	while(1){
		count=0;
		ans=0;
		scanf("%d", &n);
		if(n==0)
			break;
		for(i=0; i<=n; i++)
			count += p[i];
		for(i=0; i<count; i++){
			if(buf[i] * 2 > n)
				break;
			s = i; 
			t = count-1;
			while(s<=t){
				m = (s+t)/2;
				if(buf[i] + buf[m] == n){
					ans++;
					break;
				} else if(buf[i] + buf[m] > n){
					t = m-1;
				} else if(buf[i] + buf[m] < n){
					s = m+1;
				}
			}
		}
		printf("%d\n", ans);
	}

	return 0;
}

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

#include<iostream>
using namespace std;
bool isp[1<<17]
int n;
main()
{
    isp[0]=isp[1]=1;
    for(int i=2;i<=5e4;i++)
    {
        if(!isp[i])
        {
            for(int j=i+i;j<=5e4;j+=i)isp[j]=1;
        }
    }
    while(cin>>n,n)
    {
        int c=0;
        for(int i=2;i+2<=n;i++)if(!isp[i]&&!isp[n-i])c++;
        cout<<c<<endl;
    }
}


Compiler output:
a.cc:4:1: error: expected initializer before 'int'
    4 | int n;
      | ^~~
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:5: error: 'isp' was not declared in this scope
    7 |     isp[0]=isp[1]=1;
      |     ^~~
a.cc:15:16: error: 'n' was not declared in this scope
   15 |     while(cin>>n,n)
      |                ^