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

import java.util.Scanner;

class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        
        int answer = 0;

        while (true) {
            int a = scan.nextInt();
            String op = scan.next();
            int b = scan.nextInt();

            if (op.equals("?")) {
                break;
            }

            if (op.equals("+")) {
                answer = a + b;
            } else if (op.equals("-")) {
                answer = a - b;;
            } else if (op.equals("*")) {
                answer = a * b;
            } else if (op.equals("/")) {
                answer = a / b;
            }
            System.out.println(answer)
        }
    }
}

Compiler output:
Main.java:28: error: ';' expected
            System.out.println(answer)
                                      ^
1 error
Language: Java

import java.util.Scanner;

class Main{
    public static void main(String[] args){
        int a,b,answer;
        String op;
    	//?¨??????\??????????????????????????§????????????
		Scanner scanner = new Scanner(System.in);

		a  = scanner.nextInt();
		op = scanner.next();
		b  = scanner.nextInt();
		
		while(true){
			if(op.equals("+")){
				System.out.println(a+b);
			}
			else if(op.equals("-")){
				System.out.println(a-b);
			}
			else if(op.equals("*")){
				System.out.println(a*b);
			}
			else if(op.equals("/")){
				System.out.println(a/b);
			}
			else{
				break
			}
		}
    	scanner.close();
    }
}

Compiler output:
Main.java:28: error: ';' expected
				break
				     ^
1 error
Language: Java

import java.util.Scanner;

class Main{
    public static void main(String[] args){
        int a,b,answer;
        String op;
    	//?¨??????\??????????????????????????§????????????
		Scanner scanner = new Scanner(System.in);
		
		while(true){
			a  = scanner.nextInt();
			op = scanner.next();
			b  = scanner.nextInt();
			
			if(op.equals("+")){
				System.out.println(a+b);
			}
			else if(op.equals("-")){
				System.out.println(a-b);
			}
			else if(op.equals("*")){
				System.out.println(a*b);
			}
			else if(op.equals("/")){
				System.out.println(a/b);
			}
			else{
				break
			}
		}
    	scanner.close();
    }
}

Compiler output:
Main.java:28: error: ';' expected
				break
				     ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        
        int result;
        static final MAX=20000;
        static final MIN=0;
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder builder = new Stringbuilder();

        
        while(true){
            String data[]=reader.readLine().split(" ");
            int a=Integer.parseInt(data[0]);
            int b=Integer.parseInt(data[2]);
            String op=data[1];
            
            if(op.equals("+")) result=a+b;
            else if(op.equals("-")) result=a-b;
            else if(op.equals("*")) result=a*b;
            else if(op.equals("/")) result=a/b;
            else if(op.equals("?")) break;
            
            System.out.println(result);
        }
        
    }
}

Compiler output:
Main.java:8: error: illegal start of expression
        static final MAX=20000;
        ^
Main.java:8: error: <identifier> expected
        static final MAX=20000;
                        ^
Main.java:9: error: <identifier> expected
        static final MIN=0;
                        ^
Main.java:15: error: illegal start of type
        while(true){
        ^
Main.java:31: error: class, interface, enum, or record expected
}
^
5 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        
        int result;
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder builder = new Stringbuilder();

        
        while(true){
            String data[]=reader.readLine().split(" ");
            int a=Integer.parseInt(data[0]);
            int b=Integer.parseInt(data[2]);
            String op=data[1];
            
            if(op.equals("+")) result=a+b;
            else if(op.equals("-")) result=a-b;
            else if(op.equals("*")) result=a*b;
            else if(op.equals("/")) result=a/b;
            else if(op.equals("?")) break;
            
            System.out.println(result);
        }
        
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
        StringBuilder builder = new Stringbuilder();
                                    ^
  symbol:   class Stringbuilder
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        
        int result;
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        while(true){
            String data[]=reader.readLine().split(" ");
            int a=Integer.parseInt(data[0]);
            int b=Integer.parseInt(data[2]);
            String op=data[1];
            
            if(op.equals("+")) result=a+b;
            else if(op.equals("-")) result=a-b;
            else if(op.equals("*")) result=a*b;
            else if(op.equals("/")) result=a/b;
            else if(op.equals("?")) break;
            
            System.out.println(result);
        }
        
    }
}

Compiler output:
Main.java:22: error: variable result might not have been initialized
            System.out.println(result);
                               ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        
        int result;
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        while(true){
            String data[]=reader.readLine().split(" ");
            int a=Integer.parseInt(data[0]);
            int b=Integer.parseInt(data[2]);
            String op=data[1];
            
            if(op.equals("+")) result=a+b;
            else if(op.equals("-")) result=a-b;
            else if(op.equals("*")) result=a*b;
            else if(op.equals("/")) result=a/b;
            else if(op.equals("?")) break;
            
            System.out.print(result);
        }
    }
}

Compiler output:
Main.java:22: error: variable result might not have been initialized
            System.out.print(result);
                             ^
1 error
Language: Java

import java.io.BufferedReader;

public class Main {
    public static void main(String[] args) throws Exception {
        
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        while(true){
            String data[]=reader.readLine().split(" ");
            int a=Integer.parseInt(data[0]);
            int b=Integer.parseInt(data[2]);
            String op=data[1];
            
            if(op.equals("+")) System.out.print(a+b);
            else if(op.equals("-")) System.out.print(a-b);
            else if(op.equals("*")) System.out.print(a*b);
            else if(op.equals("/")) System.out.print(a/b);
            else if(op.equals("?")) break;
        }
    }
}

Compiler output:
Main.java:6: error: cannot find symbol
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
                                                       ^
  symbol:   class InputStreamReader
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        while(true){
            String[] data=reader.readLine().split(" ");
            int a=Integer.parseInt(data[0]);
            int b=Integer.parseInt(data[2]);
            
            if(data[1].equals("+")) System.out.print(a+b);
            else if(data[1].equals("-")) System.out.print(a-b);
            else if(data[1].equals("*")) System.out.print(a*b);
            else if(data[1].equals("/")) System.out.print(a/b);
            else if(data[1].equals("?")) break;
        }
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
    public static void main(String[] args) throws IOException {
                                                  ^
  symbol:   class IOException
  location: class Main
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        static String filal MAX=20000;
        static String final MIN=0;
        
        while(true){
            String[] data=reader.readLine().split(" ");
            int a=Integer.parseInt(data[0]);
            int b=Integer.parseInt(data[2]);
            
            if(data[1].equals("?") break;
        
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                if(data[1].equals("+")) System.out.print(a+b);
                else if(data[1].equals("-")) System.out.print(a-b);
                else if(data[1].equals("*")) System.out.print(a*b);
                else if(data[1].equals("/")) System.out.print(a/b);
            }
        }
    }
}

Compiler output:
Main.java:7: error: illegal start of expression
        static String filal MAX=20000;
        ^
Main.java:7: error: ';' expected
        static String filal MAX=20000;
                           ^
Main.java:7: error: <identifier> expected
        static String filal MAX=20000;
                               ^
Main.java:8: error: <identifier> expected
        static String final MIN=0;
                     ^
Main.java:8: error: <identifier> expected
        static String final MIN=0;
                               ^
Main.java:10: error: illegal start of type
        while(true){
        ^
Main.java:15: error: ')' expected
            if(data[1].equals("?") break;
                                  ^
Main.java:25: error: class, interface, enum, or record expected
}
^
8 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String filal MAX=20000;
        String final MIN=0;
        
        while(true){
            String[] data=reader.readLine().split(" ");
            int a=Integer.parseInt(data[0]);
            int b=Integer.parseInt(data[2]);
            
            if(data[1].equals("?") break;
        
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                if(data[1].equals("+")) System.out.print(a+b);
                else if(data[1].equals("-")) System.out.print(a-b);
                else if(data[1].equals("*")) System.out.print(a*b);
                else if(data[1].equals("/")) System.out.print(a/b);
            }
        }
    }
}

Compiler output:
Main.java:7: error: ';' expected
        String filal MAX=20000;
                    ^
Main.java:8: error: not a statement
        String final MIN=0;
        ^
Main.java:8: error: ';' expected
        String final MIN=0;
              ^
Main.java:8: error: <identifier> expected
        String final MIN=0;
                        ^
Main.java:15: error: ')' expected
            if(data[1].equals("?") break;
                                  ^
5 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int MAX=20000;
        int MIN=0;
        
        while(true){
            String[] data=reader.readLine().split(" ");
            static final int a=Integer.parseInt(data[0]);
            static final int b=Integer.parseInt(data[2]);
            
            if(data[1].equals("?") break;
        
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                if(data[1].equals("+")) System.out.print(a+b);
                else if(data[1].equals("-")) System.out.print(a-b);
                else if(data[1].equals("*")) System.out.print(a*b);
                else if(data[1].equals("/")) System.out.print(a/b);
            }
        }
    }
}

Compiler output:
Main.java:12: error: illegal start of expression
            static final int a=Integer.parseInt(data[0]);
            ^
Main.java:15: error: illegal start of type
            if(data[1].equals("?") break;
            ^
Main.java:15: error: ']' expected
            if(data[1].equals("?") break;
                    ^
Main.java:15: error: invalid method declaration; return type required
            if(data[1].equals("?") break;
                       ^
Main.java:15: error: illegal start of type
            if(data[1].equals("?") break;
                              ^
Main.java:17: error: illegal start of type
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
            ^
Main.java:17: error: <identifier> expected
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                   ^
Main.java:17: error: ']' expected
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                          ^
Main.java:17: error: ']' expected
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                                     ^
Main.java:17: error: <identifier> expected
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                                            ^
Main.java:17: error: <identifier> expected
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                                                     ^
Main.java:17: error: ']' expected
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                                                            ^
Main.java:17: error: ']' expected
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                                                                       ^
Main.java:17: error: <identifier> expected
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                                                                              ^
Main.java:24: error: class, interface, enum, or record expected
    }
    ^
15 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int MAX=20000;
        int MIN=0;
        
        while(true){
            String[] data=reader.readLine().split(" ");
            final int a=Integer.parseInt(data[0]);
            final int b=Integer.parseInt(data[2]);
            
            if(data[1].equals("?") break;
        
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                if(data[1].equals("+")) System.out.print(a+b);
                else if(data[1].equals("-")) System.out.print(a-b);
                else if(data[1].equals("*")) System.out.print(a*b);
                else if(data[1].equals("/")) System.out.print(a/b);
            }
        }
    }
}

Compiler output:
Main.java:15: error: ')' expected
            if(data[1].equals("?") break;
                                  ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int MAX=20000;
        int MIN=0;
        
        while(true){
            String[] data=reader.readLine().split(" ");
            final int a=Integer.parseInt(data[0]);
            final int b=Integer.parseInt(data[2]);
            
            if(data[1].equals("?")) break;
        
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                if(data[1].equals("+")) System.out.print(a+b);
                else if(data[1].equals("-")) System.out.print(a-b);
                else if(data[1].equals("*")) System.out.print(a*b);
                else if(data[1].equals("/")) System.out.print(a/b);
            }
        }
    }
}

Compiler output:
Main.java:17: error: bad operand types for binary operator '<='
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                   ^
  first type:  int
  second type: String
Main.java:17: error: bad operand types for binary operator '<='
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                                       ^
  first type:  String
  second type: int
Main.java:17: error: bad operand types for binary operator '<='
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                                                     ^
  first type:  int
  second type: String
Main.java:17: error: bad operand types for binary operator '<='
            if((MIN<=data[0] && data[0]<=MAX) && (MIN<=data[2] && data[2]<=MAX)){
                                                                         ^
  first type:  String
  second type: int
4 errors
Language: Java

public class Main {
	public static void main(String[] args) throws IOException{
		java.util.Scanner scan = new java.util.Scanner(System.in);
		int a = Integer.parseInt(scan.next());
		String op = scan.next();
		int b = Integer.parseInt(scan.next());
		//String op = scan.nextLine();


		if("+".equals(op)){
			System.out.println(a + b);
		}else if("-".equals(op)){
			System.out.println(a - b);
		}else if("*".equals(op)){
			System.out.println(a * b);
		}else if("/".equals(op)){
			System.out.println(a / b);
		}else if("?".equals(op)){
		}

	}

}

Compiler output:
Main.java:2: error: cannot find symbol
	public static void main(String[] args) throws IOException{
	                                              ^
  symbol:   class IOException
  location: class Main
1 error
Language: Java

#include <stdio.h>
int main()
{
	int a, b, ans;
	char c;
	while (1)
	{
		scanf("%d %d %c", &a, &b, &c);
		if (c == '+')
		{
			ans = a + b;
		}
		else if (c == '-')
		{
			ans = a - b;
		}
		else if (c == '*')
		{
			ans = a * b;
		}
		else if (c == '/')
		{
			ans = a / b;
		}
		else if (c == '?')
		{
			return 0;
		}
                printf("%d", ans);
        }
	return 0;
}

Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
	char c;
	^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: class, interface, enum, or record expected
	while (1)
	^
Main.java:9: error: class, interface, enum, or record expected
		if (c == '+')
		^
Main.java:12: error: class, interface, enum, or record expected
		}
		^
Main.java:16: error: class, interface, enum, or record expected
		}
		^
Main.java:20: error: class, interface, enum, or record expected
		}
		^
Main.java:24: error: class, interface, enum, or record expected
		}
		^
Main.java:28: error: class, interface, enum, or record expected
		}
		^
Main.java:30: error: class, interface, enum, or record expected
        }
        ^
Main.java:32: error: class, interface, enum, or record expected
}
^
12 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class itp1_4_c{
	public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		StringBuilder sb = new StringBuilder();
		
		double ans = 0;
		String[] str = line.split(" ");
		int a = Integer.parseInt(str[0]);
		String op = str[1];
		int b = Integer.parseInt(str[2]);
		
		switch(op){
			case "+":
				ans = a + b;
				break;
			case "-":
				ans = a - b;
				break;
			case "*":
				ans = a * b;
				break;
			case "/":
				ans = a / b;
				break;
			case "?":
				System.exit(0);
				break;
		}
		
		sb.append(ans).append("\n");
		System.out.print(sb);
	}
}

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

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class itp1_4_c{
	public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		StringBuilder sb = new StringBuilder();
		
		while(true){
			double ans = 0;
			String[] str = line.split(" ");
			int a = Integer.parseInt(str[0]);
			int b = Integer.parseInt(str[2]);
			
			switch(str[1]){
				case "+":
					ans = a + b;
					break;
				case "-":
					ans = a - b;
					break;
				case "*":
					ans = a * b;
					break;
				case "/":
					ans = a / b;
					break;
				default:
					break;
			}
			if(str[1].equals("?")){
				break;
			}
			sb.append(ans).append("\n");
			System.out.print(sb);
		}
	}
}

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

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    scan.nextline();String op = scan.nextLine();
    int b = scan.nextInt();
    
    if(op.equals("?")) {}
    else {System.out.println(a op b);}
    
  }
}

Compiler output:
Main.java:11: error: ')' or ',' expected
    else {System.out.println(a op b);}
                              ^
Main.java:11: error: ';' expected
    else {System.out.println(a op b);}
                                   ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    scan.nextline();String op = scan.nextLine();
    int b = scan.nextInt();
    
    if(!op.equals("?")) {}
    System.out.println(a op b);   
  }
}

Compiler output:
Main.java:11: error: ')' or ',' expected
    System.out.println(a op b);   
                        ^
Main.java:11: error: ';' expected
    System.out.println(a op b);   
                             ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    scan.nextline();String op = scan.nextLine();
    int b = scan.nextInt();
    
    if(!op.equals("?")) {
    System.out.println(a op b);}
  }
}

Compiler output:
Main.java:11: error: ')' or ',' expected
    System.out.println(a op b);}
                        ^
Main.java:11: error: ';' expected
    System.out.println(a op b);}
                             ^
2 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a; int b; String op = "a"
  while(! op == ?){
    int a = scan.next();
    String op = scan.next();
    int b = scan.next();
    
    if(op == +) {System.out.println(a + b);}
    else if(op == -) {System.out.println(a - b);}
    else if(op == *) {System.out.println(a * b);}
    else if(op == /) {System.out.println(a / b);}
    }
  }
}

Compiler output:
Main.java:6: error: ';' expected
    int a; int b; String op = "a"
                                 ^
Main.java:7: error: illegal start of expression
  while(! op == ?){
                ^
Main.java:7: error: illegal start of expression
  while(! op == ?){
                 ^
Main.java:12: error: illegal start of expression
    if(op == +) {System.out.println(a + b);}
              ^
Main.java:13: error: illegal start of expression
    else if(op == -) {System.out.println(a - b);}
                   ^
Main.java:14: error: illegal start of expression
    else if(op == *) {System.out.println(a * b);}
                  ^
Main.java:14: error: illegal start of expression
    else if(op == *) {System.out.println(a * b);}
                   ^
Main.java:15: error: illegal start of expression
    else if(op == /) {System.out.println(a / b);}
                  ^
Main.java:15: error: illegal start of expression
    else if(op == /) {System.out.println(a / b);}
                   ^
9 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a; int b; String op = "a";
  while(! op == "?"){
    int a = scan.next();
    String op = scan.next();
    int b = scan.next();
    
    if(op == "+") {System.out.println(a + b);}
    else if(op == "-") {System.out.println(a - b);}
    else if(op == "*") {System.out.println(a * b);}
    else if(op == "/") {System.out.println(a / b);}
    }
  }
}

Compiler output:
Main.java:7: error: bad operand type String for unary operator '!'
  while(! op == "?"){
        ^
Main.java:8: error: variable a is already defined in method main(String[])
    int a = scan.next();
        ^
Main.java:8: error: incompatible types: String cannot be converted to int
    int a = scan.next();
                     ^
Main.java:9: error: variable op is already defined in method main(String[])
    String op = scan.next();
           ^
Main.java:10: error: variable b is already defined in method main(String[])
    int b = scan.next();
        ^
Main.java:10: error: incompatible types: String cannot be converted to int
    int b = scan.next();
                     ^
6 errors
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a; int b; String op = "a";
  while(op !== "?"){
    a = scan.next();
    op = scan.next();
    b = scan.next();
    
    if(op == "+") {System.out.println(a + b);}
    else if(op == "-") {System.out.println(a - b);}
    else if(op == "*") {System.out.println(a * b);}
    else if(op == "/") {System.out.println(a / b);}
    }
  }
}

Compiler output:
Main.java:7: error: illegal start of expression
  while(op !== "?"){
             ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    int a; int b; String op = "a";
    while(op !== "?"){
    a = scan.next();
    op = scan.next();
    b = scan.next();
    
    if(op == "+") {System.out.println(a + b);}
    else if(op == "-") {System.out.println(a - b);}
    else if(op == "*") {System.out.println(a * b);}
    else if(op == "/") {System.out.println(a / b);}
    }
  }
}

Compiler output:
Main.java:7: error: illegal start of expression
    while(op !== "?"){
               ^
1 error
Language: Java


import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int x = in.nextInt();
        int y = in.nextInt();
        int ans = in.nextInt();
        String op = in.next();
        if (op.equals("+")) {
            ans = x + y;
        } else if (op.equals("-")) {
            ans = x - y;
        } else if (op.equals("*")) {
            ans = x * y;
        } else if (op.equals("/")) {
            ans = x / y;
        }
        System.out.println(ans);
    }
}

}

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

import java.io.*;

class Main {
    public static void main(String[] args) {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	try{
			int a = 0;
			String op = "";
			int b = 0;
			boolean end = false;
			
			while(end == false){
				String[] tmp = br.readLine().split(" ");
				a = Integer.parseInt(tmp[0]);
				op = tmp[1];
				b = Integer.parseInt(tmp[2]);
				
				if(a <= 0 && b >= 20000 || b == 0){
					op = "none";
				}
				switch(op){
				case "+":
					System.out.println(a+b);
					break;
				case "-":
					System.out.println(a-b);
					break;
				case "*":
					System.out.println(a*b);
					break;
				case "/":
					System.out.println(a/b);
					break;
				case "?":
					end = true;
					break;
				default:
					
				}
			}

Compiler output:
Main.java:40: error: reached end of file while parsing
			}
			 ^
Main.java:6: error: 'try' without 'catch', 'finally' or resource declarations
    	try{
    	^
2 errors
Language: Java

import java.io.*;

class Main {
    public static void main(String[] args) {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	try{
			int a = 0;
			String op = "";
			int b = 0;
			boolean end = false;
			
			while(end == false){
				String[] tmp = br.readLine().split(" ");
				a = Integer.parseInt(tmp[0]);
				op = tmp[1];
				b = Integer.parseInt(tmp[2]);
				
				if(a <= 0 && b >= 20000 || b == 0){
					op = "none";
				}
				switch(op){
				case "+":
					System.out.println(a+b);
					break;
				case "-":
					System.out.println(a-b);
					break;
				case "*":
					System.out.println(a*b);
					break;
				case "/":
					System.out.println(a/b);
					break;
				case "?":
					end = true;
					break;
				default:
					
				}
			}
			
        } catch (Exception e) {
            System.out.println(e);
        }
    	
    }

Compiler output:
Main.java:46: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		List<Integer> answers = new ArrayList<Integer>();
		for(;;){
			String line = scan.nextLine();
			String[] div = line.split("\\s");
			int a = Integer.parseInt(div[0]);
			String op = div[1];
			int b = Integer.parseInt(div[2]);
			if(op.equals("?")){
				break;
			}
			int ans;
			switch(op){
				case "+" :
					ans = a + b;
					break;
				case "-" :
					ans = a - b;
					break;
				case "*" :
					ans = a * b;
					break;
				case "/" :
					ans = a / b;
					break;
				default :
					break;
			}
			answers.add(ans);
		}

		for(int n : answers){
			System.out.println(n);
		}
		
	}

Compiler output:
Main.java:40: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		List<Integer> answers = new ArrayList<Integer>();
		for(;;){
			String line = scan.nextLine();
			String[] div = line.split("\\s");
			int a = Integer.parseInt(div[0]);
			String op = div[1];
			int b = Integer.parseInt(div[2]);
			if(op.equals("?")){
				break;
			}
			int ans;
			switch(op){
				case "+" :
					ans = a + b;
					break;
				case "-" :
					ans = a - b;
					break;
				case "*" :
					ans = a * b;
					break;
				case "/" :
					ans = a / b;
					break;
				default :
					break;
			}
			answers.add(ans);
		}

		for(int n : answers){
			System.out.println(n);
		}
		
	}
}

Compiler output:
Main.java:33: error: variable ans might not have been initialized
			answers.add(ans);
			            ^
1 error
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		List<Integer> answers = new ArrayList<Integer>();
		for(;;){
			String line = scan.nextLine();
			String[] div = line.split("\\s");
			int a = Integer.parseInt(div[0]);
			String op = div[1];
			int b = Integer.parseInt(div[2]);
			if(op.equals("?")){
				break;
			}
			int ans = null;
			switch(op){
				case "+" :
					ans = a + b;
					break;
				case "-" :
					ans = a - b;
					break;
				case "*" :
					ans = a * b;
					break;
				case "/" :
					ans = a / b;
					break;
				default :
					break;
			}
			answers.add(ans);
		}

		for(int n : answers){
			System.out.println(n);
		}
		
	}
}

Compiler output:
Main.java:16: error: incompatible types: <null> cannot be converted to int
			int ans = null;
			          ^
1 error
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> answers = new ArrayList<Integer>();
		for(;;){
			int a = scan.nextInt();
			char op = scan.next();
			int b = scan.nextInt();
			if(op == '?'){
				break;
			}
			int ans = 0;
			switch(op){
				case '+' :
					ans = a + b;
					break;
				case '-' :
					ans = a - b;
					break;
				case '*' :
					ans = a * b;
					break;
				case '/' :
					ans = a / b;
					break;
				default :
					break;
			}
			answers.add(ans);
		}

		for(int an : answers){
			System.out.printf("%d\n", an);
		}
	}
}

Compiler output:
Main.java:10: error: incompatible types: String cannot be converted to char
			char op = scan.next();
			                   ^
1 error
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> answers = new ArrayList<Integer>();
		for(;;){
			int a = scan.nextInt();
			String op = scan.next();
			char o = op.charAt(0);
			int b = scan.nextInt();
			if(op == '?'){
				break;
			}
			int ans = 0;
			switch(o){
				case '+' :
					ans = a + b;
					break;
				case '-' :
					ans = a - b;
					break;
				case '*' :
					ans = a * b;
					break;
				case '/' :
					ans = a / b;
					break;
				default :
					break;
			}
			answers.add(ans);
		}

		for(int an : answers){
			System.out.printf("%d\n", an);
		}
	}
}

Compiler output:
Main.java:13: error: bad operand types for binary operator '=='
			if(op == '?'){
			      ^
  first type:  String
  second type: char
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
	
		Scanner sc = new Scanner(System.in);
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		String op = sc.next();
		
		while(!op == ("?")){
			if(op == ("+"))
				System.out.println(a + b);
			else if(op == ("-"))
				System.out.println(a - b);
			else if(op == ("*"))
				System.out.println(a * b);
			else if(op == ("/"))
				System.out.println(a / b);
		}
	}
}

Compiler output:
Main.java:12: error: bad operand type String for unary operator '!'
		while(!op == ("?")){
		      ^
1 error
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
	
		Scanner sc = new Scanner(System.in);
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		String op = sc.next();
		
		while(!op == ("?")){
			if(op == ("+"))
				System.out.println(a + b);
			else if(op == ("-"))
				System.out.println(a - b);
			else if(op == ("*"))
				System.out.println(a * b);
			else if(op == ("/"))
				System.out.println(a / b);
			int a = sc.nextInt();
			int b = sc.nextInt();
			String op = sc.next();
		}
	}
}

Compiler output:
Main.java:12: error: bad operand type String for unary operator '!'
		while(!op == ("?")){
		      ^
Main.java:21: error: variable a is already defined in method main(String[])
			int a = sc.nextInt();
			    ^
Main.java:22: error: variable b is already defined in method main(String[])
			int b = sc.nextInt();
			    ^
Main.java:23: error: variable op is already defined in method main(String[])
			String op = sc.next();
			       ^
4 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
	
		Scanner sc = new Scanner(System.in);
		int = a, b;
		String = op;
		
		a = sc.nextInt();
		b = sc.nextInt();
		op = sc.next();
		
		while(!op == ("?")){
			if(op == ("+"))
				System.out.println(a + b);
			else if(op == ("-"))
				System.out.println(a - b);
			else if(op == ("*"))
				System.out.println(a * b);
			else if(op == ("/"))
				System.out.println(a / b);
			a = sc.nextInt();
			b = sc.nextInt();
			op = sc.next();
		}
	}

Compiler output:
Main.java:7: error: not a statement
		int = a, b;
		^
Main.java:7: error: ';' expected
		int = a, b;
		   ^
Main.java:7: error: not a statement
		int = a, b;
		      ^
Main.java:7: error: ';' expected
		int = a, b;
		       ^
Main.java:7: error: not a statement
		int = a, b;
		         ^
Main.java:27: error: reached end of file while parsing
	}
	 ^
6 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
	
		Scanner sc = new Scanner(System.in);
		int = a, b;
		String = op;
		
		a = sc.nextInt();
		b = sc.nextInt();
		op = sc.next();
		
		while(!op.eqauls ("?")){
			if(op.equals ("+"))
				System.out.println(a + b);
			else if(op.equals ("-"))
				System.out.println(a - b);
			else if(op.eqauls ("*"))
				System.out.println(a * b);
			else if(op.equals ("/"))
				System.out.println(a / b);
			a = sc.nextInt();
			b = sc.nextInt();
			op = sc.next();
		}
	}

Compiler output:
Main.java:7: error: not a statement
		int = a, b;
		^
Main.java:7: error: ';' expected
		int = a, b;
		   ^
Main.java:7: error: not a statement
		int = a, b;
		      ^
Main.java:7: error: ';' expected
		int = a, b;
		       ^
Main.java:7: error: not a statement
		int = a, b;
		         ^
Main.java:27: error: reached end of file while parsing
	}
	 ^
6 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
	
		Scanner sc = new Scanner(System.in);
		int = a, b;
		String = op;
		
		a = sc.nextInt();
		b = sc.nextInt();
		op = sc.next();
		
		while(!op.eqauls ("?")){
			if(op.equals ("+"))
				System.out.println(a + b);
			else if(op.equals ("-"))
				System.out.println(a - b);
			else if(op.eqauls ("*"))
				System.out.println(a * b);
			else if(op.equals ("/"))
				System.out.println(a / b);
			a = sc.nextInt();
			b = sc.nextInt();
			op = sc.next();
		}
	}
}

Compiler output:
Main.java:7: error: not a statement
		int = a, b;
		^
Main.java:7: error: ';' expected
		int = a, b;
		   ^
Main.java:7: error: not a statement
		int = a, b;
		      ^
Main.java:7: error: ';' expected
		int = a, b;
		       ^
Main.java:7: error: not a statement
		int = a, b;
		         ^
5 errors
Language: Java

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
	
		Scanner sc = new Scanner(System.in);
		int = a, b;
		String = op;
		
		a = sc.nextInt();
		b = sc.nextInt();
		op = sc.next();
		
		while(!op == ("?")){
			if(op ==("+"))
				System.out.println(a + b);
			else if(op ==("-"))
				System.out.println(a - b);
			else if(op == ("*"))
				System.out.println(a * b);
			else if(op == ("/"))
				System.out.println(a / b);
			a = sc.nextInt();
			b = sc.nextInt();
			op = sc.next();
		}
	}
}

Compiler output:
Main.java:7: error: not a statement
		int = a, b;
		^
Main.java:7: error: ';' expected
		int = a, b;
		   ^
Main.java:7: error: not a statement
		int = a, b;
		      ^
Main.java:7: error: ';' expected
		int = a, b;
		       ^
Main.java:7: error: not a statement
		int = a, b;
		         ^
5 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        String line;
        while ((line = br.readLine()) != null) {
        
            String ary[] = line.split(" ");
            int num1 = Integer.parseInt(ary[0]);
            String op = ary[1];
            int num2 = Integer.parseInt(ary[2]);
            
                if (op.equals("?")) {
                    break;
            ????????}
            
            switch (op) {
                case "+":
                    System.out.println(num1 + num2);
                    break;
                case "-":
                    System.out.println(num1 - num2);
                    break;
                case "*":
                    System.out.println(num1 * num2);
                    break;
                case "/":
                    System.out.println(num1 / num2);
                    break;
            }
        }
    }
}

Compiler output:
Main.java:18: error: illegal start of expression
            ????????}
            ^
Main.java:18: error: illegal start of expression
            ????????}
             ^
Main.java:18: error: illegal start of expression
            ????????}
              ^
Main.java:18: error: illegal start of expression
            ????????}
               ^
Main.java:18: error: illegal start of expression
            ????????}
                ^
Main.java:18: error: illegal start of expression
            ????????}
                 ^
Main.java:18: error: illegal start of expression
            ????????}
                  ^
Main.java:18: error: illegal start of expression
            ????????}
                   ^
Main.java:18: error: illegal start of expression
            ????????}
                    ^
9 errors
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
	int a = stdin.nextInt();
	String op = stdin.nextLine();
	int b = stdin.nextInt();
	int i = 3;
	while(!(op.equals("?"))){
	    if(op.equals("+")){
		System.out.println(a+b);}
	    else if(op.equals("-")){
		System.out.println(a-b);}
	    else if(op.equals("*")){
		System.out.println(a*b);}
	    else if(op.equals("/")){
		System.out.println(a/b);}
	    else{}

	    int a = stdin.nextInt();
	    String op = stdin.nextLine();
	    int b = stdin.nextInt();
	    i = i+3;
	}
    }
}

Compiler output:
Main.java:5: error: cannot find symbol
	int a = stdin.nextInt();
	        ^
  symbol:   variable stdin
  location: class Main
Main.java:6: error: cannot find symbol
	String op = stdin.nextLine();
	            ^
  symbol:   variable stdin
  location: class Main
Main.java:7: error: cannot find symbol
	int b = stdin.nextInt();
	        ^
  symbol:   variable stdin
  location: class Main
Main.java:20: error: variable a is already defined in method main(String[])
	    int a = stdin.nextInt();
	        ^
Main.java:20: error: cannot find symbol
	    int a = stdin.nextInt();
	            ^
  symbol:   variable stdin
  location: class Main
Main.java:21: error: variable op is already defined in method main(String[])
	    String op = stdin.nextLine();
	           ^
Main.java:21: error: cannot find symbol
	    String op = stdin.nextLine();
	                ^
  symbol:   variable stdin
  location: class Main
Main.java:22: error: variable b is already defined in method main(String[])
	    int b = stdin.nextInt();
	        ^
Main.java:22: error: cannot find symbol
	    int b = stdin.nextInt();
	            ^
  symbol:   variable stdin
  location: class Main
9 errors
Language: Java

import java.util.Scanner;

public class SC{
    public static void main(String[] args){
	Scanner stdin = new Scanner(System.in);
	int a = stdin.nextInt();
?????? String op = stdin.nextLine();
?????? int b = stdin.nextInt();

	while(!(op.equals("?"))){
	    
	    if(op.equals("*")){
		System.out.println(a*b);}
	    else if(op.equals("+")){
		System.out.println(a+b);}
	    else if(op.equals("/")){
		System.out.println(a/b);}
	    else if(op.equals("-")){
		System.out.println(a-b);}
	    a = stdin.nextInt();
	    op = stdin.nextLine();
	    b = stdin.nextInt();
	}
    }
}

Compiler output:
Main.java:7: error: illegal start of expression
?????? String op = stdin.nextLine();
^
Main.java:7: error: illegal start of expression
?????? String op = stdin.nextLine();
 ^
Main.java:7: error: illegal start of expression
?????? String op = stdin.nextLine();
  ^
Main.java:7: error: illegal start of expression
?????? String op = stdin.nextLine();
   ^
Main.java:7: error: illegal start of expression
?????? String op = stdin.nextLine();
    ^
Main.java:7: error: illegal start of expression
?????? String op = stdin.nextLine();
     ^
Main.java:7: error: : expected
?????? String op = stdin.nextLine();
             ^
Main.java:7: error: : expected
?????? String op = stdin.nextLine();
                                   ^
Main.java:8: error: illegal start of expression
?????? int b = stdin.nextInt();
^
Main.java:8: error: illegal start of expression
?????? int b = stdin.nextInt();
 ^
Main.java:8: error: illegal start of expression
?????? int b = stdin.nextInt();
  ^
Main.java:8: error: illegal start of expression
?????? int b = stdin.nextInt();
   ^
Main.java:8: error: illegal start of expression
?????? int b = stdin.nextInt();
    ^
Main.java:8: error: illegal start of expression
?????? int b = stdin.nextInt();
     ^
Main.java:8: error: '.class' expected
?????? int b = stdin.nextInt();
           ^
Main.java:8: error: : expected
?????? int b = stdin.nextInt();
                              ^
16 errors
Language: Java

import java.util.Scanner;
 
public class SC{
    public static void main(String[] args){
    Scanner stdin = new Scanner(System.in);
    int a = stdin.nextInt();
    String op = stdin.nextLine();
    int b = stdin.nextInt();
 
    while(!(op.equals("?"))){
         
        if(op.equals("*")){
        System.out.println(a*b);}
        else if(op.equals("+")){
        System.out.println(a+b);}
        else if(op.equals("/")){
        System.out.println(a/b);}
        else if(op.equals("-")){
        System.out.println(a-b);}
        a = stdin.nextInt();
        op = stdin.nextLine();
        b = stdin.nextInt();
    }
    }
}

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

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] line = br.readLine().split(" ");
        int a = Integer.parseInt(line[0]);
        int b = Integer.parseInt(line[2]);
        String op = line[1];
        
        if(op.equals("+")){
            System.out.println(a + b);
        }else if(op.equals("-")){
            System.out.println(a - b);
        }else if(op.equals("*")){
            System.out.println(a * b);
        }else if(op.equals("/")){
            System.out.println(a / b);
        }else{
            System.out.println("0")
        }
    }
}

Compiler output:
Main.java:21: error: ';' expected
            System.out.println("0")
                                   ^
1 error
Language: Java

public class Main {
	public static void main(String[] args){
		Scanner std = new Scanner(System.in);
	    while(true){
	 	    int a = Integer.parseInt(std.next());
	 	    String op = std.next();
	 	    int b = Integer.parseInt(std.next());
	    	int res = 0;
	    	if(op!="?"){
	    		switch(op){
	    		case "+" : res = a+b; break;
	    		case "-" : res = a-b; break;
	    		case "*" : res = a*b; break;
	    		case "/" : res = a/b; break;
	    		}
	    		System.out.println(res);
	    	}else break;
	    }
	}
}

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