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

import java.util.Scanner;

public class Abc127A {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int age = in.nextInt();
		int cost = in.nextInt();
		in.close();
		int ans = age > 12 ? cost
				: age < 6 ? 0
				: cost / 2;
		System.out.println(ans);
	}

}

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

int main() 
{
	int a, b;
	cin >> a >> b;

	if (a >= 13)
	{
		cout << b << endl;
		return 0;
	}

	if (a >= 6 && a <= 12)
	{
		cout << b / 2 << endl;
		return 0;
	}

	if (a <= 5)
	{
		cout << 0 << endl;
		return 0;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> a >> b;
      |         ^~~
a.cc:8:17: error: 'cout' was not declared in this scope
    8 |                 cout << b << endl;
      |                 ^~~~
a.cc:8:30: error: 'endl' was not declared in this scope
    8 |                 cout << b << endl;
      |                              ^~~~
a.cc:14:17: error: 'cout' was not declared in this scope
   14 |                 cout << b / 2 << endl;
      |                 ^~~~
a.cc:14:34: error: 'endl' was not declared in this scope
   14 |                 cout << b / 2 << endl;
      |                                  ^~~~
a.cc:20:17: error: 'cout' was not declared in this scope
   20 |                 cout << 0 << endl;
      |                 ^~~~
a.cc:20:30: error: 'endl' was not declared in this scope
   20 |                 cout << 0 << endl;
      |                              ^~~~
Language: C++

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

int main(){
	int a,b;
  cin>>a>>b;
  if(a>=13) ans = b;
  else if(a>=6) ans = b/2;
  else ans = 0;
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
    7 |   if(a>=13) ans = b;
      |             ^~~
      |             abs
a.cc:8:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |   else if(a>=6) ans = b/2;
      |                 ^~~
      |                 abs
a.cc:9:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   else ans = 0;
      |        ^~~
      |        abs
a.cc:10:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   cout<<ans<<endl;
      |         ^~~
      |         abs
Language: C++

A,B=map(int, input().split())

if 0 <=A<=100 and 2<=B<=1000:
    if B%2 == 1:
        print("ERROR")
        exit()
    else :
        if A <=5 :
            fare=0
        elif 6<=A<=12 :
            fare=B//2
        else:
            fare=B
else:
    print("ERROR")
    exit()

print(fare)

Compiler output:
a.cc:1:1: error: 'A' does not name a type
    1 | A,B=map(int, input().split())
      | ^
Language: C

    #incude<stdio.h>
    int main(){
      int r, D, x;
      scanf("%d%d%d", r, D, x);
      for (int i = 0; i<10; i++){
        x = r*x - D;
        printf("%d\n", x);
      }
      return 0;
    }

Compiler output:
main.c:1:6: error: invalid preprocessing directive #incude; did you mean #include?
    1 |     #incude<stdio.h>
      |      ^~~~~~
      |      include
main.c: In function 'main':
main.c:4:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |       scanf("%d%d%d", r, D, x);
      |       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 |     #incude<stdio.h>
main.c:4:7: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |       scanf("%d%d%d", r, D, x);
      |       ^~~~~
main.c:4:7: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |         printf("%d\n", x);
      |         ^~~~~~
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

    #include<stdio.h>
     
    int main(){
      int a, b;
      scanf("%d%d", &a, &b);
      if ((a  < 13) && (a > 5)) printf("%d", b/2)
      if(a<5) printf("%d", 0)
      if (a>=13)printf ("%d", b);
      return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:6:50: error: expected ';' before 'if'
    6 |       if ((a  < 13) && (a > 5)) printf("%d", b/2)
      |                                                  ^
      |                                                  ;
    7 |       if(a<5) printf("%d", 0)
      |       ~~
Language: Java


public static void main(String[] args) {

	int A = 30;
	int B = 100;

	if(A < 6){
		System.out.println("0円");
		
	}
	else if (A < 13){
		System.out.println(B/2+"円");
	}
	else{
		System.out.println(B+"円");
	}
}	


Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

public class study_1 {

public static void main(String[] args) {

	int A = 30;
	int B = 100;

	if(A < 6){
		System.out.println("0円");
		
	}
	else if (A < 13){
		System.out.println(B/2+"円");
	}
	else{
		System.out.println(B+"円");
	}
}	
}


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

#include <iostream>

using namespace std;
int main()
{
  int A,B;
  cin >> A >> B;
  if(A >= 13)cout << B << endl;  
  else{
    if(A <= 5) cout << 0 << endl; 
    else cout << B / 2 << endl;
  }
  
}

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

#include <iostream>
 
using namespace std;
 
int main(){
	int a, b;
  	cin >> a >> b;
  	if (a > 12) cout << b;
  	else if (a > 5 && a < 13) cout << b / 2;
  	else cout << 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: expected '}' at end of input
   10 |         else cout << 0;
      |                        ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

import java.util.Scanner;
class a
{
  public static void main(String[] args)
  {
    Scanner scan = new Scanner(System.in);
    int A = scan.nextInt();

    Scanner scan1 = new Scanner(System.in);
    int B = scan1.nextInt();

    if(A >= 13)
    {
      System.out.println(B);
    }
    else if(6 <= A && A <= 12)
    {
      System.out.println(B/2);
    }
    else
    {
      System.out.println(0);
    }
  }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:9: error: expected ':' before 'static'
    4 |   public static void main(String[] args)
      |         ^~~~~~~
      |         :
a.cc:4:27: error: 'String' has not been declared
    4 |   public static void main(String[] args)
      |                           ^~~~~~
a.cc:4:36: error: expected ',' or '...' before 'args'
    4 |   public static void main(String[] args)
      |                                    ^~~~
a.cc:25:2: error: expected ';' after class definition
   25 | }
      |  ^
      |  ;
a.cc: In static member function 'static void a::main(int*)':
a.cc:6:5: error: 'Scanner' was not declared in this scope
    6 |     Scanner scan = new Scanner(System.in);
      |     ^~~~~~~
a.cc:7:13: error: 'scan' was not declared in this scope
    7 |     int A = scan.nextInt();
      |             ^~~~
a.cc:9:13: error: expected ';' before 'scan1'
    9 |     Scanner scan1 = new Scanner(System.in);
      |             ^~~~~
a.cc:10:13: error: 'scan1' was not declared in this scope
   10 |     int B = scan1.nextInt();
      |             ^~~~~
a.cc:14:7: error: 'System' was not declared in this scope
   14 |       System.out.println(B);
      |       ^~~~~~
a.cc:18:7: error: 'System' was not declared in this scope
   18 |       System.out.println(B/2);
      |       ^~~~~~
a.cc:22:7: error: 'System' was not declared in this scope
   22 |       System.out.println(0);
      |       ^~~~~~
Language: Java

import java.util.Scanner;

public class Main190526_2 {
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        try{
            int age = scanner.nextInt();
            int adultPrice = scanner.nextInt();
            int finalPrice = -1;
            if(age<5) finalPrice = 0;
            else if(age<12) finalPrice = adultPrice/2;
            else finalPrice = adultPrice;
            System.out.println(finalPrice);
        }catch(Exception e){
            System.out.println(e.getMessage());
        }finally{
            scanner.close();
        }
    }
}


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

import java.util.Scanner;

public class Main190526 {
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        try{
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            int c = scanner.nextInt();
            String text = scanner.next();
            int sum = a + b + c;
            System.out.println(sum + " " + text);
        }catch(Exception e){
            System.out.println(e.getMessage());
        }finally{
            scanner.close();
        }
    }
}


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

int main(int argc, const char * argv[]) {
  int a, b;

  scanf("%d %d",&a, &b);
  if (a >= 13) {
    printf("%d\n", b);
  }
  else if (a >= 6) {
    printf("%d\n", b / 2);
  }
  else {
    printf("0\n");
  }
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:4:3: error: 'scanf' was not declared in this scope
    4 |   scanf("%d %d",&a, &b);
      |   ^~~~~
a.cc:6:5: error: 'printf' was not declared in this scope
    6 |     printf("%d\n", b);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(int argc, const char * argv[]) {
a.cc:9:5: error: 'printf' was not declared in this scope
    9 |     printf("%d\n", b / 2);
      |     ^~~~~~
a.cc:9:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:12:5: error: 'printf' was not declared in this scope
   12 |     printf("0\n");
      |     ^~~~~~
a.cc:12:5: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: Java

import java.util.Scanner;
public class FerrisWheel Main{

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int A =sc.nextInt();
		int B =sc.nextInt();
		if(A>12)
			System.out.println(B);
		else if(A>5)
			System.out.println(B/2);
		else
			System.out.println("0");
	}

}

Compiler output:
Main.java:2: error: '{' expected
public class FerrisWheel Main{
                        ^
1 error
Language: C++

#include<iostream>
using namespace std;
int main(){
  
  int r,d,x;
  cin>>r>>d>>x2000;
  for(int i=0;i<10;i++){
    x = r*x - d;
      cout<<x<<endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: 'x2000' was not declared in this scope
    6 |   cin>>r>>d>>x2000;
      |              ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  
  int r,d,x2000;
  cin>>a>>b>>x2000;
  for(int i=0;i<10;i++){
    x2000 = r*x2000 - d;
      cout<<x2000<<"\n";
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: 'a' was not declared in this scope
    6 |   cin>>a>>b>>x2000;
      |        ^
a.cc:6:11: error: 'b' was not declared in this scope
    6 |   cin>>a>>b>>x2000;
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  
  int a,b;
  cin>>a>>b;
  if(a<6)
    cout<<0;
  else if(a>12)
    cout<<b;
  else
    cout<<b/2
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected ';' before '}' token
   12 |     cout<<b/2
      |              ^
      |              ;
   13 | }
      | ~
Language: C++

int main(){
  
  int a,b;
  cin>>a>>b;
  if(a<6)
    cout<<0;
  else if(a>12)
    cout<<b;
  else
    cout<<b/2
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'cin' was not declared in this scope
    4 |   cin>>a>>b;
      |   ^~~
a.cc:6:5: error: 'cout' was not declared in this scope
    6 |     cout<<0;
      |     ^~~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout<<b;
      |     ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout<<b/2
      |     ^~~~
Language: Java

package test1;

public class Q1 {

	public static void main(String[] args) {
		Integer age = Integer.parseInt(args[0]);
		Integer price = Integer.parseInt(args[1]);

		System.out.println(calc(age,price));
	}

	private static Integer calc(Integer age, Integer price) {
		if (age<6) {
			return 0;
		} else if (age<12) {
			return (price / 2);
		} else {
			return price;
		}
	}


}


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

#include <stdio.h>
int main(void) {
  int A, B;
  scanf("%d%d", &A, &B);
  if (A >= 13) {
    printf("A君は%d歳で入場料は%d円です。\n", A, B);
  } else if (6 <= A <= 12) {
    B = (B/2);
    printf("A君は%d歳で入場料は%d円です。\n", A, B);
  } else(A <= 5) {
    printf("A君は%d歳で入場料は０円です。\n", A);
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:17: error: expected ';' before '{' token
   10 |   } else(A <= 5) {
      |                 ^~
      |                 ;
Language: C++

        static void Main(string[] args)
        {
            var input = Console.ReadLine();

            string[] inputs = input.Split(' ');

            int age = int.Parse(inputs[0]);
            int cost = int.Parse(inputs[1]);

            int result = 0;

            if (age >= 13)
            {
                result = cost;
            }  else if (age >= 6 && age <= 12)
            {
                result = cost / 2;
            } else
            {
                result = 0;
            }

            Console.WriteLine(result);

        }

Compiler output:
a.cc:1:21: error: variable or field 'Main' declared void
    1 |         static void Main(string[] args)
      |                     ^~~~
a.cc:1:26: error: 'string' was not declared in this scope
    1 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:1:33: error: expected primary-expression before ']' token
    1 |         static void Main(string[] args)
      |                                 ^
Language: C

#include<stdio.h>
int main(){
int A,B;
  scanf("%d %d", &A, &B);
        if(A>=13){
          printf("%d\n", B);
        } else if(12 >= A && A >= 6){
          printf("%d\n", B /2 );
          else
             printf("0\n");
        
        
        return 0;
        }


Compiler output:
main.c: In function 'main':
main.c:9:11: error: expected '}' before 'else'
    9 |           else
      |           ^~~~
Language: C

#include<stdio.h>
int main(){
int A,B;
  scanf("%d %d, &A, &B);
        if(A>=13){
          printf("%d\n", B);
        } else if(12 >= A && A >= 6){
          printf("%d\n", B /2 );
          else
             printf("0\n");
        
        
        return 0;
        }


Compiler output:
main.c: In function 'main':
main.c:4:9: warning: missing terminating " character
    4 |   scanf("%d %d, &A, &B);
      |         ^
main.c:4:9: error: missing terminating " character
    4 |   scanf("%d %d, &A, &B);
      |         ^~~~~~~~~~~~~~~~
main.c:5:9: error: expected expression before 'if'
    5 |         if(A>=13){
      |         ^~
main.c:14:9: error: expected declaration or statement at end of input
   14 |         }
      |         ^
Language: C

#inclucde<stdio.h>
int main(){
int A,B;
  scanf("%d %d, &A, &B);
        if(A>=13){
          printf("%d\n", B);
        } else if(12 >= A && A >= 6){
          printf("%d\n", B /2 );
          else
             printf("0\n");
        
        
        return 0;
        }


Compiler output:
main.c:1:2: error: invalid preprocessing directive #inclucde; did you mean #include?
    1 | #inclucde<stdio.h>
      |  ^~~~~~~~
      |  include
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d %d, &A, &B);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inclucde<stdio.h>
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d %d, &A, &B);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:9: warning: missing terminating " character
    4 |   scanf("%d %d, &A, &B);
      |         ^
main.c:4:9: error: missing terminating " character
    4 |   scanf("%d %d, &A, &B);
      |         ^~~~~~~~~~~~~~~~
main.c:5:9: error: expected expression before 'if'
    5 |         if(A>=13){
      |         ^~
main.c:14:9: error: expected declaration or statement at end of input
   14 |         }
      |         ^
Language: C

#inlucde<stdio.h>
int main(){
int A,B;
  scanf("%d %d, &A, &B);
        if(A>=13){
          printf("%d\n", B);
        } else if(12 >= A && A >= 6){
          printf("%d\n", B /2 );
          else
             printf("0\n");
        }
        
        return 0;
        }

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inlucde; did you mean #include?
    1 | #inlucde<stdio.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d %d, &A, &B);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #inlucde<stdio.h>
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d %d, &A, &B);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:9: warning: missing terminating " character
    4 |   scanf("%d %d, &A, &B);
      |         ^
main.c:4:9: error: missing terminating " character
    4 |   scanf("%d %d, &A, &B);
      |         ^~~~~~~~~~~~~~~~
main.c:5:9: error: expected expression before 'if'
    5 |         if(A>=13){
      |         ^~
main.c:13:18: error: expected ';' before '}' token
   13 |         return 0;
      |                  ^
      |                  ;
   14 |         }
      |         ~
Language: Java

import java.util.*;
public class shimu{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        if (a >= 13){
            System.out.println(b);
        }
        if (6 <= a && a <= 12){
            System.out.println(b/2);
        }
        if (a<6){
            System.out.println(0);
        }
        sc.close();
    }
}

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

#include<iostream>

int main() {
	int a, b;
    cin >> a >> b;
    if(a >= 13)
      cout << b;
    else if(a >= 6 && a <= 12) 
      cout << (b >> 1);
	else cout << "0";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> a >> b;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |       cout << b;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |       cout << (b >> 1);
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         else cout << "0";
      |              ^~~~
      |              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

#include<stdio.h>

int main(){
  int a,b;
  scanf("%d%d",&a,&b);
  if(a >= 13){
    printf("%d\n",b);
  }else if (6 <= a)&&(a <= 12){
    b = b / 2;
    printf("%d\n",b);
  }else{
    print(0);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:22: error: expected identifier before '(' token
    8 |   }else if (6 <= a)&&(a <= 12){
      |                      ^
Language: C

#include<stdio.h>
#include<ctype.h>
 
int main(){
  int a,b;
 
  scanf("%d%d",&a,&b);
  if(a>12){
    printf("%d",b);
  }else if(13>a&&a>5){
    printf("%d",b/2);
  }else if(6>a){
    printf("%d",0);
  }
 

Compiler output:
main.c: In function 'main':
main.c:14:3: error: expected declaration or statement at end of input
   14 |   }
      |   ^
Language: Java

package atcoder.beginner;

import java.util.Scanner;

public class A {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("age value>");
        String[] input = scanner.nextLine().split(" ");
        int age = Integer.valueOf(input[0]);
        int value = Integer.valueOf(input[1]);
        int cost = value;

        if (age <= 5) {
            cost = 0;
        } else if ( age >= 6 && age <= 12) {
            cost = value / 2;
        }

        System.out.println(cost);

    }
}


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

int A, B;
cin >> A >> B;

if (A <= 5) {
  cout << 0 << endl;
} else if ( A <= 12) {
  cout << (B / 2) << endl;
} else {
  cout << B << endl;
}

Compiler output:
a.cc:2:1: error: 'cin' does not name a type
    2 | cin >> A >> B;
      | ^~~
a.cc:4:1: error: expected unqualified-id before 'if'
    4 | if (A <= 5) {
      | ^~
a.cc:6:3: error: expected unqualified-id before 'else'
    6 | } else if ( A <= 12) {
      |   ^~~~
a.cc:8:3: error: expected unqualified-id before 'else'
    8 | } else {
      |   ^~~~
Language: C++

int A, B;
cin >> A >> B;

if (A <= 5) {
  cout << 0 << endl;
} else if ( A <= 12) {
  cout << (B//2) << endl;
} else {
  cout << B << endl;
}

Compiler output:
a.cc:2:1: error: 'cin' does not name a type
    2 | cin >> A >> B;
      | ^~~
a.cc:4:1: error: expected unqualified-id before 'if'
    4 | if (A <= 5) {
      | ^~
a.cc:6:3: error: expected unqualified-id before 'else'
    6 | } else if ( A <= 12) {
      |   ^~~~
a.cc:8:3: error: expected unqualified-id before 'else'
    8 | } else {
      |   ^~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
  	
  	int A, int B;
  	cin >> A >> B;
  	if(A < 6)
    	cout << 0 << endl;
    else if(A < 13)
      	cout << B/2 << endl;
    else
      	cout << B << endl; 	
  
 	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected unqualified-id before 'int'
    7 |         int A, int B;
      |                ^~~
a.cc:8:21: error: 'B' was not declared in this scope
    8 |         cin >> A >> B;
      |                     ^
Language: C++

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

int main() {
  int A, B;
  cin A, B;
  if (A <= 5)
    cout << 0 << endl;
  if (6 <= A <= 12)
    cout << B / 2 << endl;
  else
    cout << B << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:6: error: expected ';' before 'A'
    6 |   cin A, B;
      |      ^~
      |      ;
Language: Java

import java.util.Scanner;

public class FerrisWheel {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int age = scan.nextInt();
		int price = scan.nextInt();
		int payment = 0;

		if (price % 2 == 0) {
			if (age >= 13) {
				payment = price;
			} else if (age >= 12 || age <= 6) {
				payment = price / 2;
			} else if (age <= 5) {
				payment = 0;
			}
			System.out.println(payment);
		}
	}
}


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

#include<iostream>
using namespace std;
 
int main(void) {
  int n,m;
  cin >> n >> m;
  int num_a[m];
  int num_b[m];
  bool flag = 1;
  for (int i = 0; i < m; i++) {
	cin >> num_a[i] >> num_b[i];
  }
  int min = num_a[0];
  int max = num_b[0];
  
  for (int i = 1; i < m; i++) {
	if (min < num_a[i]) {
      min = num_a[i];
    }
    if (max > num_b[i]) {
      max = num_b[i];
    }
    if (num_b[i] - num_a[i] > n) {
		flag = 0;
      	break;
  }
 if (flag != 0){
  	cout << max - min + 1 << endl;
 }else{
   cout << 0 << endl;
 }
}
#include<iostream>
using namespace std;
 
int main(void) {
  int n,m;
  cin >> n >> m;
  int num_a[m];
  int num_b[m];
  bool flag = 1;
  for (int i = 0; i < m; i++) {
	cin >> num_a[i] >> num_b[i];
  }
  int min = num_a[0];
  int max = num_b[0];
  
  for (int i = 1; i < m; i++) {
	if (min < num_a[i]) {
      min = num_a[i];
    }
    if (max > num_b[i]) {
      max = num_b[i];
    }
    if (num_b[i] - num_a[i] > n) {
		flag = 0;
      	break;
    }
  }
 if (flag != 0){
  	cout << max - min + 1 << endl;
 }else{
   cout << 0 << endl;
 }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:16: error: a function-definition is not allowed here before '{' token
   36 | int main(void) {
      |                ^
a.cc:65:2: error: expected '}' at end of input
   65 | }
      |  ^
a.cc:4:16: note: to match this '{'
    4 | int main(void) {
      |                ^
Language: Java

public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int age = scan.nextInt();
		int price = scan.nextInt();
		int payment = 0;

		if (price % 2 == 0) {
			if (age >= 13) {
				payment = price;
			} else if (age >= 12 || age <= 6) {
				payment = price / 2;
			} else if (age <= 5) {
				payment = 0;
			}
			System.out.println(payment);
		}
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i)
#define each(i,c) for(__typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define all(v) v.begin(), v.end()
#define mset(a, n) memset(a, n, sizeof(a))

typedef long long ll;

const int INF = 1000000000;
const int MOD = 1000000007;

int main () {
	int A, B; cin >> A >> B;
	if (A <= 5) cout << 0 << endl;
	else (A >= 13) cout << B << endl;
	else cout << B / 2 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:23: error: expected ';' before 'cout'
   19 |         else (A >= 13) cout << B << endl;
      |                       ^~~~~
      |                       ;
a.cc:20:9: error: 'else' without a previous 'if'
   20 |         else cout << B / 2 << endl;
      |         ^~~~
Language: C++

#include<bits/stdc++.h>
using namecpace std;
int main(){
  int a,b;
  cin>>a>>b;
  if(a>12)cout<<b<<endl;
  else if(a<6)cout<<b/2<<endl;
  else cout<<0<<endl;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namecpace'
    2 | using namecpace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>a>>b;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:11: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   if(a>12)cout<<b<<endl;
      |           ^~~~
      |           std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   if(a>12)cout<<b<<endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:7:15: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   else if(a<6)cout<<b/2<<endl;
      |               ^~~~
      |               std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   else if(a<6)cout<<b/2<<endl;
      |                          ^~~~
      |                          std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:8:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   else cout<<0<<endl;
      |        ^~~~
      |        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   else cout<<0<<endl;
      |                 ^~~~
      |                 std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int gates[100001] = { 0, };
int main()
{
	int n, m;
	int L, R;
	vector<Card> card;

	cin >> n >> m;
	for (int j = 0; j < m; j++) {
		cin >> L >> R;
		for (int i = L; i <= R; i++) {
			gates[i]++;
		}
	}

	int answer=0;
	for (i = 1; i <= m; i++) {
		if (gates[i] == n) answer++;
		
	}
	cout <<answer<< endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: 'Card' was not declared in this scope
   11 |         vector<Card> card;
      |                ^~~~
a.cc:11:20: error: template argument 1 is invalid
   11 |         vector<Card> card;
      |                    ^
a.cc:11:20: error: template argument 2 is invalid
a.cc:22:14: error: 'i' was not declared in this scope
   22 |         for (i = 1; i <= m; i++) {
      |              ^
Language: Java

public class CheckFee {
  public static void main (String args[]){
  int a = Integer.parseInt(args[0]);
  int b = Integer.parseInt(args[1]);
  
  if(a >= 13){
    System.out.println(b);
  }
  if(6 <= a <= 12){
    System.out.println(b /2);
  }
  if(a <= 5){
    System.out.println("0");
  }
}
}

Compiler output:
Main.java:1: error: class CheckFee is public, should be declared in a file named CheckFee.java
public class CheckFee {
       ^
Main.java:9: error: bad operand types for binary operator '<='
  if(6 <= a <= 12){
            ^
  first type:  boolean
  second type: int
2 errors
Language: Java

public static void main (String args[]){
  int a = Integer.parseInt(args[0]);
  int b = Integer.parseInt(args[1]);
  
  if(a >= 13){
    System.out.println(b);
  }
  if(6 <= a <= 12){
    System.out.println(b /2);
  }
  if(a <= 5){
    System.out.println("0");
  }
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main (String args[]){
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include<bits/std++.h>

using namespace std ;

int main (){
    
    long long a , b ;
    
    cin >> a >> b ;
    
    if (a>12)
        b=b;
    else if (a>5)
        b/=2 ;
    else
        b=0 ;
    
    cout << b ;
    
    return 0 ;
}


Compiler output:
a.cc:1:9: fatal error: bits/std++.h: No such file or directory
    1 | #include<bits/std++.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostram>
using namespace std;
int main()
{
  int a, b;
  cin >>a >>b;
  if(a <=5)
    cout <<0;
  else if(a>=13)
    cout << b/2;
  else
    cout<<b;
  return 0;
}

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

#include<bits/stdc++.h>

using namespace std;

int main(){
    int N; cin>>N;
    int M; cin>>M;
    int LN,RN;//加減上限
    vector<int> L(M);
    vector<int> R(M);
    int(int i=0;i<M;i++){
        cin>>L[i];
        cin>>R[i];
    }
    LN=1;
    RN=N;
    for(int i=0;i<M;i++){
        if(L[i]>LN) LN=L[i];
        if(R[i]<RN) RN=R[i];
        if(L[i]>R[i]){
            RN=LN-1;
        }
    }
    printf("%d",RN-LN+1);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected primary-expression before 'int'
   11 |     int(int i=0;i<M;i++){
      |     ^~~
a.cc:11:17: error: 'i' was not declared in this scope
   11 |     int(int i=0;i<M;i++){
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namesapace std;
int main()
{
  int a,b;
  cin>>a>>b;
  if(a>=13)
    cout<<b;
  else if(a>=6&&a<=12)
    cout<<(b/2);
  else
    cout<<0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapace'
    2 | using namesapace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>a>>b;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout<<b;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     cout<<(b/2);
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout<<0;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: Java

import java.util.Scanner;
 
public class Main
{
 
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
 
		int age = Integer.parseInt(sc.next());
 		int b = Integer.parseInt(sc.next());
		
      	if(age>=13){
          System.out.println(b);
        }else if(age<=5){
          System.out.println(0);
        }else{
          System.out.println(b/2)
        }
          
	}
}

Compiler output:
Main.java:18: error: ';' expected
          System.out.println(b/2)
                                 ^
1 error
Language: C

#include <stdio.h>

int main(void){
  int A, B;
  
  scanf("%d %d", &A, &B);
  
  if(A > 12){
    printf("%d",B);
   }
  else if(A > 5 && A < 13){
    print("%d", B/2);
   }
  else{
    printf("0");
  }
  
}

Compiler output:
main.c: In function 'main':
main.c:12:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   12 |     print("%d", B/2);
      |     ^~~~~
      |     printf
Language: C++

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

int main() {

  int A,B;
  cin >> A >>B;
   if( A>=13) {
    cout << B << endl;
  }

  else if(6<=A<=12) {
      B/=2
    cout <<  B << endl;
  }
  else if(A<6){
  cout <<0<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: expected ';' before 'cout'
   13 |       B/=2
      |           ^
      |           ;
   14 |     cout <<  B << endl;
      |     ~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  if(13 <= a){
    cout<<b<<endl;
    return 0;
  }else if(6 <= a <= 12){
    cout<<b/2<<endl;
    return 0;
  }else if(a <= 5{
    cout<<0<<endl;
    return 0;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: expected ')' before '{' token
   12 |   }else if(a <= 5{
      |           ~      ^
      |                  )
a.cc:16:1: error: expected primary-expression before '}' token
   16 | }
      | ^
Language: C++

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

int main() {

  int A,B;
  cin >> A >>B;
   if( A>=13) {
    cout << B << endl;
  }

  if else(6<=A<=12) {
    cout <<  B/2 << endl;
  }
  if else(A<=5){
  cout <<0<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:6: error: expected '(' before 'else'
   12 |   if else(6<=A<=12) {
      |      ^~~~
      |      (
a.cc:15:6: error: expected '(' before 'else'
   15 |   if else(A<=5){
      |      ^~~~
      |      (
Language: C++

#include <bits/std++c.h>
using namespace std;
int main(){
  int A,B;
  cin >> A >> B;
  if(A <= 5)
    cout << 0 << endl;
  else if(A >= 6 && A <= 12)
    cout << B/2 << endl;
  else
    cout << B << endl;
}

Compiler output:
a.cc:1:10: fatal error: bits/std++c.h: No such file or directory
    1 | #include <bits/std++c.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  if(a <= 5){
    cout<<0<<endl;
    return 0;
  }else if(a => 13){
    cout<<b<<endl;
    return 0;
  }else{
    cout<<a/2<<endl;
    return 0;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected primary-expression before '>' token
    9 |   }else if(a => 13){
      |               ^
Language: C++

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

int main() {

  int A.B;
  cin >> A >>B;
   if( B>13) {
    cout << B << endl;
  }

  if(5<B<13) {
    cout <<  B/2 << endl;
  }
  if(B<6){
  cout <<0<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: expected initializer before '.' token
    6 |   int A.B;
      |        ^
a.cc:7:10: error: 'A' was not declared in this scope
    7 |   cin >> A >>B;
      |          ^
a.cc:7:14: error: 'B' was not declared in this scope
    7 |   cin >> A >>B;
      |              ^
Language: Java

                    import  java.util.Scanner;
                     
                    public class Main{
                    	public static void Main(String[] args){
                          Scanner sc = new Scanner(System.in);
                          String str;
                          while(sc.hasNext()){
                            str  = sc.next();
                          }
                           //String str[2] = str.split(" ");
                          String[] str2;
                          str2 = new String[2];
                          str2 = str.split(" ");
                          int num1 = Integer.parseInt(str2[0]);
                           int num2 = Integer.parseInt(str2[1]);
                            
                           if(num1 >= 13){
                             System.out.println(num2);
                           }else if(num1 >= 6){
                             System.out.println(num2/2);
                           }else {
                             System.out.println(0);
                           }
                        }
                     }

Compiler output:
Main.java:13: error: variable str might not have been initialized
                          str2 = str.split(" ");
                                 ^
1 error
Language: C++

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

int main(){
  int a, b;
  cin >> a >> b;
  if (a <= 5) {
    cout << 0 <<endl;
  }
  else if (a <= 12 && a >= 6) {
    cout << b / 2 <<endl;
  }
  else {
    cout << b <<endl;
  }
}

Compiler output:
a.cc:1:10: fatal error: bits/stdc.h++: No such file or directory
    1 | #include <bits/stdc.h++>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: Java

                import  java.util.Scanner;
                 
                public class Main{
                	public static void Main(String[] args){
                      Scanner sc = new Scanner(System.in);
                      String str;
                      while(sc.hasNext()){
                        str  = sc.next();
                      }
                       //String str[2] = str.split(" ");
                      String[] str2;
                      str2 = new String[2];
                      str2 = str.split(" ");
                      int num1 = Integer.parseInt(str2[0]);
                       int num2 = integer.parseInt(str2[1]);
                        
                       if(num1 >= 13){
                         System.out.println(num2);
                       else if(num1 >= 6){
                         System.out.println(num2/2);
                       else {
                         System.out.println(0);
                       }
                    }
                 }

Compiler output:
Main.java:21: error: 'else' without 'if'
                       else {
                       ^
Main.java:19: error: 'else' without 'if'
                       else if(num1 >= 6){
                       ^
Main.java:25: error: reached end of file while parsing
                 }
                  ^
3 errors
Language: C

#include<stdio.h>
int main(void) {
	int a, b,c;
	scanf("%d %d", &a, &b);
	if (a < 6) {
		c = 0;
	}
	else if (a < 13) {
		c = b / 2;
	}
	else {
		c = b;
	}
	printf("%d\n", c);
	retrun 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:9: error: 'retrun' undeclared (first use in this function)
   15 |         retrun 0;
      |         ^~~~~~
main.c:15:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:15: error: expected ';' before numeric constant
   15 |         retrun 0;
      |               ^~
      |               ;
Language: Java

            import  java.util.Scanner;
             
            public class Main{
            	public static void Main(String[] args){
                  Scanner sc = new Scanner(System.in);
                  String str;
                  while(sc.hasNext()){
                    str  = sc.next();
                  }
                   String str[2] = str.split(" ");
                   int num1 = Integer.parseInt(str[0]);
                   int num2 = integer.parseInt(str[1]);
                    
                   if(num1 >= 13){
                     System.out.println(num2);
                   else if(num1 >= 6){
                     System.out.println(num2/2);
                   else {
                     System.out.println(0);
                   }
                }
             }

Compiler output:
Main.java:10: error: ']' expected
                   String str[2] = str.split(" ");
                              ^
Main.java:18: error: 'else' without 'if'
                   else {
                   ^
Main.java:16: error: 'else' without 'if'
                   else if(num1 >= 6){
                   ^
Main.java:22: error: reached end of file while parsing
             }
              ^
4 errors
Language: C

#include<stdio.h>
int main() {
	int a, b,c;
	scanf("%d %d", &a, &b);
	if (a < 6) {
		c = 0;
	}
	else if (a < 13) {
		c = b / 2;
	}
	else {
		c = b;
	}
	printf("%d\n", c);
	retrun 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:9: error: 'retrun' undeclared (first use in this function)
   15 |         retrun 0;
      |         ^~~~~~
main.c:15:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:15: error: expected ';' before numeric constant
   15 |         retrun 0;
      |               ^~
      |               ;
Language: Java

        import  java.util.Scanner;
         
        public class Main{
        	public static void Main(String[] args){
              Scanner sc = new Scanner(System.in);
              String str;
              while(sc.hasNext()){
                str  = sc.next();
              }
               String[2]  str= str.split(" ");
               int num1 = Integer.parseInt(str[0]);
               int num2 = integer.parseInt(str[1]);
                
               if(num1 >= 13){
                 System.out.println(num2);
               else if(num1 >= 6){
                 System.out.println(num2/2);
               else {
                 System.out.println(0);
               }
            }
         }

Compiler output:
Main.java:10: error: not a statement
               String[2]  str= str.split(" ");
                     ^
Main.java:10: error: ';' expected
               String[2]  str= str.split(" ");
                        ^
Main.java:18: error: 'else' without 'if'
               else {
               ^
Main.java:16: error: 'else' without 'if'
               else if(num1 >= 6){
               ^
Main.java:22: error: reached end of file while parsing
         }
          ^
5 errors
Language: C

#include<stdio.h>
int main(){
  int A,B;
  scanf(%d %d,&A,&B);
  if(A>= 13){
    printf("%d\n",B);
  }else if(6<= A &&  12>= A){
    printf("%d\n",B/2);  
  }
  printf("0\n");
  
  return 0;
}
    


Compiler output:
main.c: In function 'main':
main.c:4:9: error: expected expression before '%' token
    4 |   scanf(%d %d,&A,&B);
      |         ^