criyle/codenet-compile-errors huggingface dataset:
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:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(stdio.h)
      |         ^
main.c: In function 'main':
main.c:4:9: 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 | #include(stdio.h)
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         scanf("%d %d", &a, &b);
      |         ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |         printf("%d\n", c);
      |         ^~~~~~
main.c:14:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:9: note: include '<stdio.h>' or provide a declaration of 'printf'
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:9: error: illegal start of expression
           ]
           ^
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
     }
      ^
6 errors
Language: C

#include<stdio.h>
inimain(){
  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:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | inimain(){
      | ^~~~~~~
main.c: In function 'inimain':
main.c:4:9: error: expected expression before '%' token
    4 |   scanf(%d %d,&A,&B);
      |         ^
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:
a.cc: In function 'int main()':
a.cc:7:34: error: expected ';' before ':' token
    7 |                 cout << b << endl:
      |                                  ^
      |                                  ;
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:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(stdio.h)
      |         ^
main.c: In function 'main':
main.c:4:9: 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 | #include(stdio.h)
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         scanf("%d %d", &a, &b);
      |         ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:14:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 |         printf("%d\n", c);
      |         ^~~~~~
main.c:14:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:9: note: include '<stdio.h>' or provide a declaration of 'printf'
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:9: error: illegal start of expression
       ]
       ^
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:25: error: reached end of file while parsing
}
 ^
5 errors
Language: C++

a, b = (int(i) for i in input().split())
res =0
if a>=13 :
  res = b
elif a<=5:
  res = 0
else:
  res = int(b/2)
print(res)

Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a, b = (int(i) for i in input().split())
      | ^
Language: C++

import java.util.*;

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

	age = sc.nextInt();
	charge = sc.nextInt();
	if(0 <= age && age <= 100 && 2 <= charge && charge <= 1000){
	    if(age % 2 == 0){
		if(6 <= age && age <= 12){
		    charge = charge / 2;
		}if (age <= 5){
		    charge = 0;
		}
	    }
	}
	System.out.println(charge);
    }
}
	
	    
	


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: C++

#include <stdio.h>

int main(void) {
	// your code goes here
     int a;
     int b;
     scanf(“%d”,&a);
     scanf(“%d”,&b);
     if(a>=13){
printf(“%d”,b);
}else if(a<13 && a>=6){
printf(“%d”,b/2);
}else{
printf(“0”);
return 0;
}


Compiler output:
a.cc:7:12: error: extended character “ is not valid in an identifier
    7 |      scanf(“%d”,&a);
      |            ^
a.cc:7:14: error: extended character ” is not valid in an identifier
    7 |      scanf(“%d”,&a);
      |              ^
a.cc:8:12: error: extended character “ is not valid in an identifier
    8 |      scanf(“%d”,&b);
      |            ^
a.cc:8:14: error: extended character ” is not valid in an identifier
    8 |      scanf(“%d”,&b);
      |              ^
a.cc:10:8: error: extended character “ is not valid in an identifier
   10 | printf(“%d”,b);
      |        ^
a.cc:10:10: error: extended character ” is not valid in an identifier
   10 | printf(“%d”,b);
      |          ^
a.cc:12:8: error: extended character “ is not valid in an identifier
   12 | printf(“%d”,b/2);
      |        ^
a.cc:12:10: error: extended character ” is not valid in an identifier
   12 | printf(“%d”,b/2);
      |          ^
a.cc:14:8: error: extended character “ is not valid in an identifier
   14 | printf(“0”);
      |        ^
a.cc:14:8: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:7:12: error: '\U0000201c' was not declared in this scope
    7 |      scanf(“%d”,&a);
      |            ^
a.cc:7:14: error: 'd\U0000201d' was not declared in this scope
    7 |      scanf(“%d”,&a);
      |              ^~
a.cc:14:8: error: '\U0000201c0\U0000201d' was not declared in this scope
   14 | printf(“0”);
      |        ^~~
a.cc:16:2: error: expected '}' at end of input
   16 | }
      |  ^
a.cc:3:16: note: to match this '{'
    3 | int main(void) {
      |                ^
Language: Java

import java.util.*;
import java.io.*;

public class Solution
{
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String inp[]= br.readLine().split(" ");
        int a= Integer.parseInt(inp[0]);
        int b= Integer.parseInt(inp[1]);
        if(a<=12 && a>=6)
        	b/=2;
        else
        	if(a<=5)
        		b=0;
        System.out.print(b);
	}
}

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

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

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


Compiler output:
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include<iostream>

using namespace std;

int mian()
{
    int age, mon;

    cin >> age >> mon;
    if(age >= 13)
    {
        cout << mon  << endl;
    }
    else if(age <= 5)
    {
        cout << 0 << endl;
    }
    else
    {
        cout << mon/ 2 << endl;
    }
    
    

    return 0;
}

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

import java.util.*;
import java.io.*;

public class Solution
{
	public static void main (String[] args) throws java.lang.Exception
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String inp[]= br.redaLine();
        int a= Integer.parseInt(inp[0]);
        int b= Integer.parseInt(inp[1]);
        if(a<=12 && a>=6)
        	b/=2
        else
        	if(a<=5)
        		b=0;
        System.out.print(b);
	}
}

Compiler output:
Main.java:13: error: ';' expected
        	b/=2
        	    ^
1 error
Language: C

#include<stdio.h>
 
int main(void)
{
  int num[2];
  int c = 0;
  
  canf("%d%d",&num[0], &num[1]);
  
  if(num[0]>=13){
    printf("%d",num[1]);
  } else if((6<=num[0])&&(num[0]>=12)){
    printf("%d",num[1]/2);
  } else {
    printf("%d",c);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'canf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |   canf("%d%d",&num[0], &num[1]);
      |   ^~~~
      |   scanf
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:15:9: error: expected ';' before '}' token
   15 | return 0
      |         ^
      |         ;
   16 | }
      | ~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:4:20: error: 'd' undeclared (first use in this function)
    4 |   scanf("%d%d",&a,&d);
      |                    ^
main.c:4:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:10:18: error: expected ')' before 'B'
   10 |     printf("%d\n"B/2);
      |           ~      ^
      |                  )
main.c:15:9: error: expected ';' before '}' token
   15 | return 0
      |         ^
      |         ;
   16 | }
      | ~
Language: C++

#include <stdio.h>

int a, b;

scanf("%d %d", &a, &b);
if(a>=13){
	if(a<0 || a>100){
  	break;
	
    }
else if (a>=6 && a<=12) {
  printf("%d", b/2);
}
  else {
    b = 0;
 	 print("%d", b);
  }

Compiler output:
a.cc:5:6: error: expected constructor, destructor, or type conversion before '(' token
    5 | scanf("%d %d", &a, &b);
      |      ^
a.cc:6:1: error: expected unqualified-id before 'if'
    6 | if(a>=13){
      | ^~
Language: Java

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;
import java.util.StringTokenizer;

public class main {
    public static void main(String[] args)
    {
        Scanner r=new Scanner(System.in);
        int A=r.nextInt();
        int B=r.nextInt();
        if(A>=13)
        {
            System.out.println(B);
        }else if(A>=6 && A<=12)
        {
            System.out.println(B/2);
        }
        else
        {
            System.out.println(0);
        }
    }
    public static class Reader {
        BufferedReader br;
        StringTokenizer st;

        public Reader(File s) throws IOException
        {
            br = new BufferedReader(new FileReader(s));
        }


        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine(){
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
    //--------------------------------------------------------
}



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

#include<iostreamg>
using namespace std;

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

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

import java.util.Scanner;

public class main {
    public void main(String[] args)
    {
        Scanner r=new Scanner(System.in);
        int A=r.nextInt();
        int B=r.nextInt();
        if(A>=13)
        {
            System.out.println(B);
        }else if(A>=6 && A<=12)
        {
            System.out.println(B/2);
        }
        else
        {
            System.out.println(0);
        }
    }
}

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

#  include<stdio.h>
signed   main(){
     int a, b;
     scanf("%d  %d"&a,&b);
     if (a <=  5)
     printf ("%d\n",b%2);
     else  if (a <= 12  &&  a >=  6)
     printf("%d\n",b/2);
    else  
    printf ("%d\n",b);
return(0);


Compiler output:
main.c: In function 'main':
main.c:4:20: error: invalid operands to binary & (have 'char *' and 'int')
    4 |      scanf("%d  %d"&a,&b);
      |            ~~~~~~~~^
      |            |
      |            char *
main.c:11:1: error: expected declaration or statement at end of input
   11 | return(0);
      | ^~~~~~
Language: C

# include<stdio.h>
signed   main(){
     int a, b;
     scanf("%d   %d"&a,&b);
     if (a <=  5)
     printf ("0\n");
     else  if (a <= 12  &&  a >=  6)
     printf("%d\n",b/2);
    else  
    printf ("%d\n",b);
return(0);


Compiler output:
main.c: In function 'main':
main.c:4:21: error: invalid operands to binary & (have 'char *' and 'int')
    4 |      scanf("%d   %d"&a,&b);
      |            ~~~~~~~~~^
      |            |
      |            char *
main.c:11:1: error: expected declaration or statement at end of input
   11 | return(0);
      | ^~~~~~
Language: Java

import java.util.Scanner;

public class taskA {
    public void main(String[] args)
    {
        Scanner r=new Scanner(System.in);
        int A=r.nextInt();
        int B=r.nextInt();
        if(A>=13)
        {
            System.out.println(B);
        }else if(A>=6 && A<=12)
        {
            System.out.println(B/2);
        }
        else
        {
            System.out.println(0);
        }
    }
}


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

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


Compiler output:
main.c: In function 'main':
main.c:4:21: error: invalid operands to binary & (have 'char *' and 'int')
    4 |      scanf("%d   %d"&a,&b);
      |            ~~~~~~~~~^
      |            |
      |            char *
main.c:13:1: error: expected declaration or statement at end of input
   13 | return(0);
      | ^~~~~~
Language: C++

#include <iostream>
#include <algorithm>

using namespace std ;



int main(){
    int age;
    int pay;

    if(scanf("%d %d",&age,&pay) != 2){
        // do something, like..
        fprintf( stderr, "Expected at least two numbers as input\n");
        exit(1);
    };

    if(B%2 = 1){
        fprintf( stderr, "B is even number\n");
        exit(1);
    }

    if(age>13){
        printf("%d",pay);
    }
    else if(age<=12 && age>=6){
        printf("%d",pay/2);
    }
    else{
        printf("%d",0);
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: 'B' was not declared in this scope
   18 |     if(B%2 = 1){
      |        ^
Language: C

#include<stdio.h>
 
int main(void)
{
  int a, b;
  int c = 0;
  
  scanf("%d",a);
  scanf("%d",b);
  
  if(num[0]>=13){
    printf("%d",num[1]);
  } else if((6<=num[0])&&(num[0]>=12)){
    printf("%d",num[1]/2);
  } else {
    printf("%d",c);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:6: error: 'num' undeclared (first use in this function)
   11 |   if(num[0]>=13){
      |      ^~~
main.c:11:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:22:3: error: expected declaration or statement at end of input
   22 |   return 0;
      |   ^~~~~~
Language: Java

import java.util.Scanner;
protected class Solution{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A,B,ans;
    A = sc.nextInt();
    B = sc.nextInt();
    if(A>=13)
      ans = B;
    else if((A>=6)&&(A<=12))
      ans = (B/2);
    else
      ans = 0;
    System.out.println(ans);
  }
}
    


Compiler output:
Main.java:2: error: modifier protected not allowed here
protected class Solution{
          ^
1 error
Language: Java

import java.util.Scanner;
public class Solution{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A,B,ans;
    A = sc.nextInt();
    B = sc.nextInt();
    if(A>=13)
      ans = B;
    else if((A>=6)&&(A<=12))
      ans = (B/2);
    else
      ans = 0;
    System.out.println(ans);
  }
}
    


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

import java.util.*


fun main() {
    val sc = Scanner(System.`in`)
    val a = sc.nextInt()
    val b = sc.nextInt()
    when {
        a >= 13 -> println(b)
        a in 6..12 -> println(b / 2)
        else -> println(0)
    }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
Main.java:5: error: illegal character: '`'
    val sc = Scanner(System.`in`)
                            ^
Main.java:5: error: illegal character: '`'
    val sc = Scanner(System.`in`)
                               ^
3 errors
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:4:21: error: invalid operands to binary & (have 'char *' and 'int')
    4 |      scanf("%d   %d"&a,&b);
      |            ~~~~~~~~~^
      |            |
      |            char *
Language: C++

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:2: 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:8:1: error: expected '}' before 'else'
    8 | else if(5<a<13){
      | ^~~~
a.cc:6:11: note: to match this '{'
    6 |  if(a>=13){
      |           ^
a.cc:10:1: error: expected '}' before 'else'
   10 | else{
      | ^~~~
a.cc:8:16: note: to match this '{'
    8 | else if(5<a<13){
      |                ^
a.cc:13:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 | cout>>ans>>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:13:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 | cout>>ans>>endl;
      |            ^~~~
      |            std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:31: error: expected primary-expression before ']' token
    8 |         else    cout<<0<<endl;]
      |                               ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

bool CompareMin(int a, int b) {
	return a > b;  
}
typedef long long ll;
int main(){
    int a,b,c;
    cin >>a >> b;
    if(a <=5){
        cout << 0 << endl;
    }else if(a<=12){
        cout << b/2 << endl;
    }
    else if(a>13){
        cout <<b << endl;
    }

    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: expected '}' at end of input
   21 |     return 0;
      |              ^
a.cc:9:11: note: to match this '{'
    9 | int main(){
      |           ^
Language: C++

#include <iostream>
 2#include <stdlib.h>
 3#include <vector>
 4#include <string>
 5#include <algorithm>
 6#include <cmath>
 7using namespace std;
 8int main(int argc,char** argv){
 9  int a,b;
10  cin >> a >> b;
11  if(a > 12){ cout << b << endl;}
12  else if(a > 5){ cout << b /2 << endl;}
13  else {cout << 0 << endl;}
14
15  return 0;
16}




Compiler output:
a.cc:2:3: error: stray '#' in program
    2 |  2#include <stdlib.h>
      |   ^
a.cc:3:3: error: stray '#' in program
    3 |  3#include <vector>
      |   ^
a.cc:4:3: error: stray '#' in program
    4 |  4#include <string>
      |   ^
a.cc:5:3: error: stray '#' in program
    5 |  5#include <algorithm>
      |   ^
a.cc:6:3: error: stray '#' in program
    6 |  6#include <cmath>
      |   ^
a.cc:2:2: error: expected unqualified-id before numeric constant
    2 |  2#include <stdlib.h>
      |  ^
a.cc:8:2: error: expected unqualified-id before numeric constant
    8 |  8int main(int argc,char** argv){
      |  ^~~~
Language: C

#include<stdio.h>
 
int main(void)
{
  int num[2];
  int c = 0;
  
  scanf("%d %d",&num[0], &num[1]);
  
  if(num[0]>=13){
    printf("%d",num[1]);
  } else if((6<=num[0])&&(num[0]>=12){
    printf("%d",num[1]/2);
  } else {
    printf("%d",c);
  }
  return 0;
            }

Compiler output:
main.c: In function 'main':
main.c:12:38: error: expected ')' before '{' token
   12 |   } else if((6<=num[0])&&(num[0]>=12){
      |            ~                         ^
      |                                      )
main.c:18:13: error: expected expression before '}' token
   18 |             }
      |             ^
Language: Java

import java.util.Scanner;
public class Solution{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int A,B,ans;
    A = sc.nextInt();
    B = sc.nextInt();
    if(A>=13)
      ans = B;
    else if((A>=6)&&(A<=12))
      ans = (B/2);
    else
      ams = 0;
    System.out.println(ans);
  }
}
    

Compiler output:
Main.java:2: error: class Solution is public, should be declared in a file named Solution.java
public class Solution{
       ^
Main.java:13: error: cannot find symbol
      ams = 0;
      ^
  symbol:   variable ams
  location: class Solution
2 errors
Language: C++

#include <bits/stdc++.h>
int main()
{
  int n, m;
  std::cin>>n>>m;
  if(n>12)
  {
    std::cout<<m;
  }
  else if(n>5)
  {
    std::cout<<m/2;
  }
  else
  {
    a=0;
    std::cout<<a;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'a' was not declared in this scope
   16 |     a=0;
      |     ^
Language: C

#include<stdio.h>
 
int main(void)
{
  int num[2];
  int c = 0;
  
  scanf("%d %d",&num[0], &num[1]);
  
  if(a>=13){
    printf("%d",num[1]);
  } else if((6<=a)&&(a>=12){
    printf("%d",num[1]/2);
  } else {
    printf("%d",c);
  }
  return 0;
            }

Compiler output:
main.c: In function 'main':
main.c:10:6: error: 'a' undeclared (first use in this function)
   10 |   if(a>=13){
      |      ^
main.c:10:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:28: error: expected ')' before '{' token
   12 |   } else if((6<=a)&&(a>=12){
      |            ~               ^
      |                            )
main.c:18:13: error: expected expression before '}' token
   18 |             }
      |             ^
Language: C

#include <stdio.h>
/*
    演算子を用いた計算のプログラム
*/
 
void main()
{
  int age;
  int money;
  scanf("%d",&age);
  scanf("%d",&money)
  if(age>12){
  printf("%d",&money);
  }else if(age<13){
   printf("%d",money/2);
  }else{
  printf("0")
  }
  
}

Compiler output:
main.c: In function 'main':
main.c:11:21: error: expected ';' before 'if'
   11 |   scanf("%d",&money)
      |                     ^
      |                     ;
   12 |   if(age>12){
      |   ~~
Language: C++

function Main(input) {
  input = input.split(' ');
  var age = input[0];
  var few = input[1];
  if(age < 6){
   console.log(0);
  }else if (age > 12 ) {
   console.log(few);
  } else {
   console.log(few / 2);
  }
  
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Compiler output:
a.cc:1:1: error: 'function' does not name a type; did you mean 'union'?
    1 | function Main(input) {
      | ^~~~~~~~
      | union
a.cc:14:5: error: expected constructor, destructor, or type conversion before '(' token
   14 | Main(require("fs").readFileSync("/dev/stdin", "utf8"));
      |     ^
Language: C++

#include <bits/stdc++.h>
int main()
{
  int n, m;
  cin>>n>>m;
  if(n>12)
  {
    cout<<m;
  }
  else if(n>5)
  {
    cout<<m/2;
  }
  else
  {
    a=0;
    cout<<a;
  }
  return 0;
}

Compiler output:
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>>n>>m;
      |   ^~~
      |   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<<m;
      |     ^~~~
      |     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<<m/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:16:5: error: 'a' was not declared in this scope
   16 |     a=0;
      |     ^
a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     cout<<a;
      |     ^~~~
      |     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<iostream>
int main()
{
   int a,b;
  cin>>a>>b;
  if(a>=13)
    cout<<b;
  else if(a<=12&&a>=6)
   cout<<b/2;
  else
     cout<<"0";
}

Compiler output:
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 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:5: 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:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |    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:11:6: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |      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 <iostream>

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

Compiler output:
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 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:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |     cout << 0;
      |     ^~~~
      |     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:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     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:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     cout << b;
      |     ^~~~
      |     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(void)
{
  int a, b;
  int c = 0;
  
  scanf("%d %d",&a, &b);
  
  if(a>=13){
    printf("%d",b);
  } else if((6<=a)&&(a>=12){
    printf("%d",b/2);
  } else {
    printf("%d",c);
  }
  return 0;
            }

Compiler output:
main.c: In function 'main':
main.c:12:28: error: expected ')' before '{' token
   12 |   } else if((6<=a)&&(a>=12){
      |            ~               ^
      |                            )
main.c:18:13: error: expected expression before '}' token
   18 |             }
      |             ^
Language: C++

#include <std/c++.h>
int main()
{
  int n, m;
  cin>>n>>m;
  if(n>12)
  {
    cout<<m;
  }
  else if(n>5)
  {
    cout<<m/2;
  }
  else
  {
    a=0;
    cout<<a;
  }
  return 0;
}

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

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

Compiler output:
main.c: In function 'main':
main.c:4:21: error: expected ';' before 'if'
    4 | scanf("%d %d",&a,&b)
      |                     ^
      |                     ;
    5 | if(a>=13){
      | ~~
Language: C++

#include<iostream>

void main() {
	unsigned short a;
	unsigned short b;
	a = 0;
	b = 0;
	std::cin >> a >> b;
	//6~12
	if (a <= 12 && a >= 6) std::cout << b / 2;
	//5以下
	else if (a <= 5)std::cout << 0;
	else std::cout << b;
}

Compiler output:
a.cc:3:1: error: '::main' must return 'int'
    3 | void main() {
      | ^~~~
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:12:22: error: 'z' undeclared (first use in this function)
   12 |   } else if((6<=a)&&(z>=12){
      |                      ^
main.c:12:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:28: error: expected ')' before '{' token
   12 |   } else if((6<=a)&&(z>=12){
      |            ~               ^
      |                            )
main.c:18:13: error: expected expression before '}' token
   18 |             }
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif
ll a,b;
	cin>>a>>b;
if(a>=13)
	cout<<b;
else if(a>=6 && a<=12)
	cout<<(b/2);
else cout<<"0";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'll' was not declared in this scope
    9 | ll a,b;
      | ^~
a.cc:10:14: error: 'a' was not declared in this scope
   10 |         cin>>a>>b;
      |              ^
a.cc:10:17: error: 'b' was not declared in this scope
   10 |         cin>>a>>b;
      |                 ^
Language: C++

#include<iostream>
#include <string.h>
#include <algorithm>
#include <string>
#include <math.h>
using namespace std;

double gcd( double m, double n )
{
	// 引数に０がある場合は０を返す
	if ( ( 0 == m ) || ( 0 == n ) )
		return 0;
	
    double p=0;
	// ユークリッドの方法
	while( m > n )
	{
        m = m/2;
        p+=1;
	}
	return p;
}//gcd

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

    if(a >= 13){
        cout << b;
    }else if(a < 6){
        cout << "0";
    }else{
        cout << b/2
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:20: error: expected ';' before '}' token
   34 |         cout << b/2
      |                    ^
      |                    ;
   35 |     }
      |     ~
Language: Java

import java.util.Scanner;

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		int ans;

		if (a < 6)
			ans = 0;
		else if (a >= 6 && a <= 12)
			ans = b / 2;
		else
			ans = b;
		System.out.println(ans);
	}


Compiler output:
Main.java:3: 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

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'c' was not declared in this scope
    5 |   c=b/2;
      |   ^
Language: C

#include <stdio.h>


int main() {
	int a, num;
	scanf_s("%d %d", &a, &num);
	if (a >= 13) {
		printf("%d\n", num);
	}
	else if (12 >= a && a >= 6) {
		printf("%d\n", num / 2);
	}
	else {
		printf("%d\n", 0);
	}
	
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d %d", &a, &num);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <iostream>
#include <cstdio>
using namespace std;
int main(void){
    // 自分の得意な言語で
    // Let's チャレンジ！！
	int N,M;
	cin>>N>>M;
	if(N)printf("%d\n",N);
	else if(N>5&&N<13)printf("%d\n",N/2);
	elseprintf("0\n");

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'elseprintf' was not declared in this scope; did you mean 'vswprintf'?
   11 |         elseprintf("0\n");
      |         ^~~~~~~~~~
      |         vswprintf
Language: C++

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

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 /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:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         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:8:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |         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:10:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         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:10:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         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:13:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |         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:13:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |         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<stdio.h>

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


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

#include <iostream>
#include <cmath>
#include <vector>
#include <cstdio>
#include <algorithm>
#include <string>

using namespace std;

typedef long long LL;
typedef unsigned int UI;

#define rSort(a) 		sort(a.rbegin(),a.rend())
#define Sort(a) 		sort(a.begin(),a.end())
#define Reverse(a) 		reverse(a.begin(),a.end())
#define Sum(a)  		accumulate(a.begin(), a.end(), 0)
#define REP(i, n) 		for(UI i = 0;i < n;i++)
#define REPR(i, n) 		for(UI i = n;i >= 0;i--)
#define FOR(i, m, n) 	for(UI i = m;i < n;i++)
#define pb(i) 			push_back(i)

#define MOD  			(LL)1e9 + 7;
#define INF  			(LL)1 << 62;


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

	cin.tie(0);
	ios::sync_with_stdio(false);

	LL N;
	LL ans = 0;

	cin >> A >> B;

	if(A>=13){
		ans=B;
	}else if(A>6 && A<=12){
		ans = B/2;
	}else{
		ans=0;
	}

	cout << ans << endl;

	return 0;

}



Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:34:16: error: 'A' was not declared in this scope
   34 |         cin >> A >> B;
      |                ^
a.cc:34:21: error: 'B' was not declared in this scope
   34 |         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;
  }else if(A>=6&&A<=12){
    cout <<B/2<<endl;
  }else if(A>=13){
    cout <<B<<endl;
  }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >>A>>B;
      |   ^~~
a.cc:7:5: error: 'cout' was not declared in this scope
    7 |     cout <<0<<endl;
      |     ^~~~
a.cc:7:15: error: 'endl' was not declared in this scope
    7 |     cout <<0<<endl;
      |               ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout <<B/2<<endl;
      |     ^~~~
a.cc:9:17: error: 'endl' was not declared in this scope
    9 |     cout <<B/2<<endl;
      |                 ^~~~
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout <<B<<endl;
      |     ^~~~
a.cc:11:15: error: 'endl' was not declared in this scope
   11 |     cout <<B<<endl;
      |               ^~~~
Language: C++

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

int main(){

	int a,b;
	cin >> a >> b;

	int ans = 0;
	if(a <= 5){
		ans = 0;
	}
	else if(a <= 12){
		ans = b / 2;
	else{
		ans = b;
	}

	cout << ans << endl;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: expected '}' before 'else'
   16 |         else{
      |         ^~~~
a.cc:14:25: note: to match this '{'
   14 |         else if(a <= 12){
      |                         ^
Language: C++

#include <iostream>
using namespace std;

int A, B;

cin >> A >> B;

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


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

#include <stdio.h>


int main(void) {
	int a, b, num;
	scanf_s("%d %d", &a, &num);
	if (a >= 13) {
		printf("%d\n", num);
	}
	else if (12 >= a && a >= 6) {
		printf("%d\n", num / 2);
	}
	else {
		printf("%d\n", 0);
	}
	
}

Compiler output:
main.c: In function 'main':
main.c:6:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    6 |         scanf_s("%d %d", &a, &num);
      |         ^~~~~~~
      |         scanf
Language: C

#include<iostream>
#include<algorithm>
#include<iterator>
#include<vector>
#include<string>
#include<map>

using namespace std;


#define mod(cans) cans%10**9+7
#define cin_pl(x,y) for(int i=0;i<x;i++){cin>>y[i];}
#define pl_twin(x,y,z) for(int i=0;i<x;i++){cin>>y[i]>>z[i];}
#define debug(x) cout << "Debug" << x << "\n"
#define rep(i,n) for(int i=0;i<n;i++)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define st(s) size_t size = s.length()
#define prians(Answer) cout<<Answer<<"\n"
#define make_pair mp;
#define com_div(x,Co) for(int i=1;i<x+1;i++){if(x%i==0){Co++;}}
#define TF(X) X==1?cout<<"Yes\n":cout<<"No\n"
#define elcon else{continue;}

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vector<int>> matrix;
typedef pair<int,int> pr;
typedef greater<int> gi;

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


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


import java.util.*;

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

        int a = sc.nextInt();
        int b = sc.nextInt();
        int k;

        if(a>13){
            k=b;
        }else if(a<=6){
            k=b/2;
        }else if(a>6){
            k=0;
        }

        System.out.println(k);

    }
}

Compiler output:
Main.java:20: error: variable k might not have been initialized
        System.out.println(k);
                           ^
1 error