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

import java.util.Scanner;
import java.io.*;
 
public class Main{
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
       
        while(true){
            int a=sc.nextInt();
            b=sc.next();
            if(b.equals("?"))break;
            int c=sc.nextInt();
            if(b.equals("+"))System.out.println(a+c);
            if(b.equals("-"))System.out.println(a-c);
            if(b.equals("*"))System.out.println(a*c);
            if(b.equals("/"))System.out.println(a/c);
        }
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
            b=sc.next();
            ^
  symbol:   variable b
  location: class Main
Main.java:11: error: cannot find symbol
            if(b.equals("?"))break;
               ^
  symbol:   variable b
  location: class Main
Main.java:13: error: cannot find symbol
            if(b.equals("+"))System.out.println(a+c);
               ^
  symbol:   variable b
  location: class Main
Main.java:14: error: cannot find symbol
            if(b.equals("-"))System.out.println(a-c);
               ^
  symbol:   variable b
  location: class Main
Main.java:15: error: cannot find symbol
            if(b.equals("*"))System.out.println(a*c);
               ^
  symbol:   variable b
  location: class Main
Main.java:16: error: cannot find symbol
            if(b.equals("/"))System.out.println(a/c);
               ^
  symbol:   variable b
  location: class Main
6 errors
Language: Java

import java.util.Scanner;
public class Caa{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
String op = sc.next();
int b = sc.nextInt();
if(op.equals("+")){
System.out.printf("%d",a+b);}
else if(op.equals("-")){
System.out.printf("%d",a-b);}
else if(op.equals("*")){
System.out.printf("%d",a*b);}
else if(op.equals("/")){
System.out.printf("%d",a/b);}
else{
System.out.printf("\n");}
}
}

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

import java.util.Scanner;
public class Caa{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
String op = sc.next();
int b = sc.nextInt();
if(op.equals("+")){System.out.printf("%d",a+b);}
else if(op.equals("-")){System.out.printf("%d",a-b);}
else if(op.equals("*")){System.out.printf("%d",a*b);}
else if(op.equals("/")){System.out.printf("%d",a/b);}
else{System.out.printf("");}
System.out.println("");
}
}

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

#include<stdio.h>
int main(void){
    int a,b,c;
    char op;
    while(1){
        scanf ("%d %c %d",&a,&op,&b);
        if(op == '?'){
            break;
        }
        if(op == '+'){
            c=a+b;
            printf("%d\n",c);
        }
        if(op == '-'){
        c=a-b;
        printf("%d\n",c);
        }
        if(op=='*'){
            c=a*b;
            printf("%d\n",c);
        }
        if(op=='/'){
            c=a/b;
            printf("%d\n",c);
        }
    }
    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:4: error: unnamed classes are a preview feature and are disabled by default.
    char op;
    ^
  (use --enable-preview to enable unnamed classes)
Main.java:5: error: class, interface, enum, or record expected
    while(1){
    ^
Main.java:7: error: class, interface, enum, or record expected
        if(op == '?'){
        ^
Main.java:9: error: class, interface, enum, or record expected
        }
        ^
Main.java:12: error: class, interface, enum, or record expected
            printf("%d\n",c);
            ^
Main.java:13: error: class, interface, enum, or record expected
        }
        ^
Main.java:16: error: class, interface, enum, or record expected
        printf("%d\n",c);
        ^
Main.java:17: error: class, interface, enum, or record expected
        }
        ^
Main.java:20: error: class, interface, enum, or record expected
            printf("%d\n",c);
            ^
Main.java:21: error: class, interface, enum, or record expected
        }
        ^
Main.java:24: error: class, interface, enum, or record expected
            printf("%d\n",c);
            ^
Main.java:25: error: class, interface, enum, or record expected
        }
        ^
Main.java:28: error: class, interface, enum, or record expected
}
^
15 errors
Language: Java

mport java.io.*;
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        String s=sc.nextLine();
        Scanner kb=new Scanner(s);
        int a[]=new int[2];
        int i=0;
        String op="";
        while (kb.hasNext()){
            if (kb.hasNextInt()==false){
                op=kb.next();
            }
            a[i]=kb.nextInt();
            i++;
        }
        switch(op){
        case "+":
            System.out.println(a[0]+a[1]);
            break;
        case "-":
            System.out.println(a[0]-a[1]);
            break;
        case "*":
            System.out.println(a[0]*a[1]);
            break;
        case "/":
            System.out.println(a[0]/a[1]);
            break;
        }
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.io.*;
^
Main.java:2: error: class, interface, enum, or record expected
import java.util.Scanner;
^
2 errors
Language: Java

import java.util.Scanner;

public class Main2 {
    public static int main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Integer a = sc.nextInt();
        String op = sc.next();
        Integer b = sc.nextInt();

        if(op == null){
            System.out.printf("");
        } else switch (op) {
            case "+":
                System.out.printf("%d", a + b);
                break;
            case "-":
                System.out.printf("%d", a - b);
                break;
            case "/":
                System.out.printf("%d", a / b);
                break;
            case "*":
                System.out.printf("%d", a * b);
                break;
            default:
                System.out.printf("");
        }
        return  0;
    }
}

Compiler output:
Main.java:3: error: class Main2 is public, should be declared in a file named Main2.java
public class Main2 {
       ^
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();
		String op = sc.nextString();
		int b = sc.nextInt();
		int answer;
		switch (op)
		{
		case "*":
			answer = a*b;
			break;
		case "+":
			answer = a + b;
			break;
		case "-":
			answer = a - b;
			break;
		case "/":
			answer = a / b;
			break;
		}
			System.out.println(answer);
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		String op = sc.nextString();
		              ^
  symbol:   method nextString()
  location: variable sc of type Scanner
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();
		String op = sc.next();
		int b = sc.nextInt();
		int answer;
		switch (op)
		{
		case "*":
			answer = a*b;
			break;
		case "+":
			answer = a + b;
			break;
		case "-":
			answer = a - b;
			break;
		case "/":
			answer = a / b;
			break;
		}
			System.out.println(answer);
	}
}

Compiler output:
Main.java:25: error: variable answer might not have been initialized
			System.out.println(answer);
			                   ^
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();
		String op = sc.next();
		int b = sc.nextInt();
		int answer = 0;
		while (true)
		{
			switch (op)
			{
			case "*":
				answer = a*b;
				System.out.println(answer);
				break;
			case "+":
				answer = a + b;
				System.out.println(answer);
				break;
			case "-":
				answer = a - b;
				System.out.println(answer);
				break;
			case "/":
				answer = a / b;
				System.out.println(answer);
				break;
			default:
				break;
			}
			if (op = "?")
				break;
		}
	}
}

Compiler output:
Main.java:33: error: incompatible types: String cannot be converted to boolean
			if (op = "?")
			       ^
1 error
Language: Java

import java.util.Scanner;
public class Calculator {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String e;
		do{
			int a = sc.nextInt();		
			e = sc.next();
			int b = sc.nextInt();
			int ans;
			
			switch(e){
			case "+":
				ans = (int)(a + b);
				System.out.printf("%d\n",ans); 
				break;
			case "-":
				ans = (int)(a - b);
				System.out.printf("%d\n",ans);
				break;
			case "*":
				ans = (int)(a * b);
				System.out.printf("%d\n",ans);
				break;
			case "/":
				ans = (int)(a / b);
				System.out.printf("%d\n",ans);
				break;
			default:
			}
		}while(e != "?");
	}
}

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

import java.util.Scanner;
public class Calculator {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String e;
		do{
			int a = sc.nextInt();		
			e = sc.next();
			int b = sc.nextInt();
			int ans;
			
			switch(e){
			case "+":
				ans = (int)(a + b);
				System.out.printf("%d\n",ans); 
				break;
			case "-":
				ans = (int)(a - b);
				System.out.printf("%d\n",ans);
				break;
			case "*":
				ans = (int)(a * b);
				System.out.printf("%d\n",ans);
				break;
			case "/":
				ans = (int)(a / b);
				System.out.printf("%d\n",ans);
				break;
			default:
				break;
			}
		}while(e != "?");
	}
}

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

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

public class Main{
public static void main(String [] args);
BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
try{
String str = reader.readLine(); 
String array[]=new String[3];
array = str.split(" ");
int x = Integer.parseInt(array[0]);
int y = Integer.parseInt(array[2]);
String op = array[1];

if (op.equals("?")){
break;
}else if(op.equals("+")){
System.out.println(x+y);

}else if(op.equals("-")){
System.out.println(x-y);

}else if(op.equals("*")){
System.out.println(x*y);

}else if(op.equals("/")){
System.out.println(x/y);
}
}
}

Compiler output:
Main.java:7: error: illegal start of type
try{
^
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));
while(true){
String str = reader.readLine(); 
String array[]=new String[3];
array = str.split(" ");
int x = Integer.parseInt(array[0]);
int y = Integer.parseInt(array[2]);
String op = array[1];

if (op.equals("?")){
break;
}else if(op.equals("+")){
System.out.println(x+y);

}else if(op.equals("-")){
System.out.println(x-y);

}else if(op.equals("*")){
System.out.println(x*y);

}else if(op.equals("/")){
System.out.println(x/y);
}
}
}

Compiler output:
Main.java:30: error: reached end of file while parsing
}
 ^
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));
while(true){
String str = reader.readLine(); 
String array[]=new String[3];
array = str.split(" ");
int x = Integer.parseInt(array[0]);
int y = Integer.parseInt(array[2]);
String op = array[1];

if (op.equals("?")){
break;
}else if(op.equals("+")){
System.out.println(x+y);

}else if(op.equals("-")){
System.out.println(x-y);

}else if(op.equals("*")){
System.out.println(x*y);

}else if(op.equals("/")){
System.out.println(x/y);
}
}

Compiler output:
Main.java:29: error: reached end of file while parsing
}
 ^
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));
while(true){
String str = reader.readLine(); 
String array[]=new String[3];
array = str.split(" ");
int x = Integer.parseInt(array[0]);
int y = Integer.parseInt(array[2]);
String op = array[1];

if (op.equals("?")){
break;
}else if(op.equals("+")){
System.out.println(x+y);

}else if(op.equals("-")){
System.out.println(x-y);

}else if(op.equals("*")){
System.out.println(x*y);

}else if(op.equals("/")){
System.out.println(x/y);
}

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

import java.util.Scanner;

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

		while(sc.hasNext()){
			int a = sc.nextInt();
			String op = sc.next();
			int b = sc.nextInt();
			int answer=0;			

			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;
			}
			else if(op.equals("?")){
				break;
			}
		System.out.printf("%d\n", answer);
		}
	}
}

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

import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int x;
		int a = scan.nextInt();
		String str = scan.next();
		int b = scan.nextInt();
		if (str.equals("+")){
			x = a+b;
		}
		else if(str.equals("-")){
			x = a-b;
		}
		else if(str.equals("*")){
			x = a*b;
		}
		else if(str.equals("/")){
			x = a/b;
		}
		System.out.println(x);
	}
}

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

mport java.util.Scanner;

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

			else if(op.equals("*")){
				ans=x*y;
				System.out.println(ans);
			}
			else if(op.equals("/")){
				if(y!=0){
				ans=x/y;
				System.out.println(ans);
				}
			}
			else if(op.equals("?")){
				i=0;
			}
		}		
	}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: Java

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

public class main10010 {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(true){
			String A=scan.next();
			String op=scan.next();
			String B=scan.next();
			if(op.equals("?")){
				break;
			}
			
			int a=Integer.parseInt(A);
			int b=Integer.parseInt(B);
			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;
			}
		}
    }
}

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

import java.util.Scanner;

public class calcurator {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a,b;
        String op;
        for(;;){
            a = sc.nextInt();
            op = sc.next();
            b = sc.nextInt();
            if(op == "?") break;
            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;
                default:
                    break;
            }
        }
    }
}

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

import java.util.Scanner;

public class calcurator {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int flg = 1;
        int a,b;
        String op;
        while(flg > 0) {
            a = sc.nextInt();
            op = sc.next();
            b = sc.nextInt();
            if(op == "?") flg = -1;
            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;
                default:
                    break;
            }
        }
    }
}

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

import java.util.Scanner;

class Main
{
	public static void main(String args[])
	{
		int flag =1;
		do
		{
			Scanner scan= new Scanner(System.in);
			int a = scan.nextInt();
			String op = scan.next();
			int b = scan.nextInt();
			scan.close();
			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 "?":
					flag = -1;
					break;
			}
		}while(flag>0)

	}
}

Compiler output:
Main.java:33: error: ';' expected
		}while(flag>0)
		              ^
1 error
Language: Java

import java.util.Scanner;

class Main
{
	public static void main(String args[])
	{
		int flag =1;
		do
		{
			Scanner scan= new Scanner(System.in);
			int a = scan.nextInt();
			String op = scan.next();
			int b = scan.nextInt();
			scan.close();
			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;
				break;
			}
		}while(flag>0);

	}
}

Compiler output:
Main.java:29: error: unreachable statement
				break;
				^
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();
  string op=nextString();
  if(op!="+"&&op!="-"&&op!="*"&&op="/"){
  op="?";
  int ans;
  int b=sc.nextInt();
  if(op!="?"){
  if(op="+") ans=a+b;
  else if(op="-") ans=a-b;
  else if(op="*") ans=a*b;
  else ans=a/b;
  System.out.println(ans);
  }else{
   
  }
 }
}
 

Compiler output:
Main.java:22: error: reached end of file while parsing
}
 ^
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();
		String op = scan.next();
		int b = scan.nextInt();
		while (true) {
			if (op.equals("+")) {
				System.out.println(a + b);
				a = scan.nextInt();
				op = scan.next();
				b = scan.nextInt();
			} else if (op.equals("-")) {
				System.out.println(a - b);
				a = scan.nextInt();
				op = scan.next();
				b = scan.nextInt();
			} else if (op.equals("*")) {
				System.out.println(a * b);
				a = scan.nextInt();
				op = scan.next();
				b = scan.nextInt();
			} else if (op.equals("/")) {
				System.out.println(a / b);
				a = scan.nextInt();
				op = scan.next();
				b = scan.nextInt();
			} else if (op.equals("?")) {
				break;
			}
????????????????}
????????}
}

Compiler output:
Main.java:33: error: illegal start of expression
????????????????}
^
Main.java:33: error: illegal start of expression
????????????????}
 ^
Main.java:33: error: illegal start of expression
????????????????}
  ^
Main.java:33: error: illegal start of expression
????????????????}
   ^
Main.java:33: error: illegal start of expression
????????????????}
    ^
Main.java:33: error: illegal start of expression
????????????????}
     ^
Main.java:33: error: illegal start of expression
????????????????}
      ^
Main.java:33: error: illegal start of expression
????????????????}
       ^
Main.java:33: error: illegal start of expression
????????????????}
        ^
Main.java:33: error: illegal start of expression
????????????????}
         ^
Main.java:33: error: illegal start of expression
????????????????}
          ^
Main.java:33: error: illegal start of expression
????????????????}
           ^
Main.java:33: error: illegal start of expression
????????????????}
            ^
Main.java:33: error: illegal start of expression
????????????????}
             ^
Main.java:33: error: illegal start of expression
????????????????}
              ^
Main.java:33: error: illegal start of expression
????????????????}
               ^
Main.java:33: error: illegal start of expression
????????????????}
                ^
Main.java:34: error: illegal start of expression
????????}
^
Main.java:34: error: illegal start of expression
????????}
 ^
Main.java:34: error: illegal start of expression
????????}
  ^
Main.java:34: error: illegal start of expression
????????}
   ^
Main.java:34: error: illegal start of expression
????????}
    ^
Main.java:34: error: illegal start of expression
????????}
     ^
Main.java:34: error: illegal start of expression
????????}
      ^
Main.java:34: error: illegal start of expression
????????}
       ^
Main.java:34: error: illegal start of expression
????????}
        ^
26 errors
Language: Java

import java.util.Scanner;

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

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

import java.util.Scanner;

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

Compiler output:
Main.java:3: error: class SimpleC is public, should be declared in a file named SimpleC.java
public class SimpleC{
       ^
Main.java:7: error: cannot find symbol
  String op=sc.nextString();
              ^
  symbol:   method nextString()
  location: variable sc of type Scanner
Main.java:13: error: incompatible types: String cannot be converted to boolean
  if(op="+") ans=a+b;
       ^
Main.java:14: error: incompatible types: String cannot be converted to boolean
  else if(op="-") ans=a-b;
            ^
Main.java:15: error: incompatible types: String cannot be converted to boolean
  else if(op="*") ans=a*b;
            ^
5 errors
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:8: error: ')' expected
  if(!(op.equals"+")&&!(op.equals"-")&&!(op.equals"*")&&!(op.equals"/")){
                ^
Main.java:8: error: ';' expected
  if(!(op.equals"+")&&!(op.equals"-")&&!(op.equals"*")&&!(op.equals"/")){
                   ^
Main.java:8: error: not a statement
  if(!(op.equals"+")&&!(op.equals"-")&&!(op.equals"*")&&!(op.equals"/")){
                          ^
Main.java:8: error: ';' expected
  if(!(op.equals"+")&&!(op.equals"-")&&!(op.equals"*")&&!(op.equals"/")){
                                 ^
Main.java:8: error: not a statement
  if(!(op.equals"+")&&!(op.equals"-")&&!(op.equals"*")&&!(op.equals"/")){
                                           ^
Main.java:8: error: ';' expected
  if(!(op.equals"+")&&!(op.equals"-")&&!(op.equals"*")&&!(op.equals"/")){
                                                  ^
Main.java:8: error: not a statement
  if(!(op.equals"+")&&!(op.equals"-")&&!(op.equals"*")&&!(op.equals"/")){
                                                            ^
Main.java:8: error: ';' expected
  if(!(op.equals"+")&&!(op.equals"-")&&!(op.equals"*")&&!(op.equals"/")){
                                                                   ^
Main.java:12: error: ')' expected
  if(!(op.equals"?")){
                ^
Main.java:12: error: ';' expected
  if(!(op.equals"?")){
                   ^
Main.java:13: error: ')' expected
  if(op.equals"+") ans=a+b;
              ^
Main.java:13: error: ';' expected
  if(op.equals"+") ans=a+b;
                 ^
Main.java:14: error: ')' expected
  else if(op.equals"-") ans=a-b;
                   ^
Main.java:14: error: ';' expected
  else if(op.equals"-") ans=a-b;
                      ^
Main.java:14: error: 'else' without 'if'
  else if(op.equals"-") ans=a-b;
  ^
Main.java:15: error: ')' expected
  else if(op.equals"*") ans=a*b;
                   ^
Main.java:15: error: ';' expected
  else if(op.equals"*") ans=a*b;
                      ^
Main.java:15: error: 'else' without 'if'
  else if(op.equals"*") ans=a*b;
  ^
Main.java:16: error: 'else' without 'if'
  else ans=a/b;
  ^
Main.java:18: error: 'else' without 'if'
  }else{
   ^
20 errors
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:3: error: class SimpleC is public, should be declared in a file named SimpleC.java
public class SimpleC{
       ^
Main.java:7: error: cannot find symbol
  String op=sc.nextChar();
              ^
  symbol:   method nextChar()
  location: variable sc of type Scanner
2 errors
Language: Java

import java.util.Scanner;

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

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

import java.util.Scanner;

public class SimpleCalculator
{
	public static void main(String[] args)
	{
		int flg = 1, a, b;
		do
		{
			Scanner sc = new Scanner(System.in);
			a = sc.nextInt();
			String op = sc.next();
			b = sc.nextInt();
			
			switch(op.charAt(0))
			{
				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 '?':
					flg--;
					break;
			}
		} while(flg > 0);
	}
}

Compiler output:
Main.java:3: error: class SimpleCalculator is public, should be declared in a file named SimpleCalculator.java
public class SimpleCalculator
       ^
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();
		String op = sc.next();
		int b = sc.nextInt();
		
		switch(op.charAt(0))
		{
			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 '?':
				break;
		}
}

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

import java.util.Scanner;

public class SimpleC{
 public static void main(String[] args){
  Scanner sc=new Scanner(System.in);
  int a=sc.nextInt();
  String op=System.in.read();

  int b=sc.nextInt();
  
  int i=0,j=0;
  int[] ans=new int[10000];

  while(!(op.equals("?"))){
  if(op.equals("+")) {
  ans[i]=a+b;
  }else if(op.equals("-")){
  ans[i]=a-b;
  }else if(op.equals("*")){
  ans[i]=a*b;
  }else{
  ans[i]=a/b;
  }
  i++;
  }

  while(j<i){
  System.out.println(ans[j]);
  j++;
  }
 }
}
 
  

Compiler output:
Main.java:3: error: class SimpleC is public, should be declared in a file named SimpleC.java
public class SimpleC{
       ^
Main.java:7: error: incompatible types: int cannot be converted to String
  String op=System.in.read();
                          ^
2 errors
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();
  String op=System.in.read();

  int b=sc.nextInt();
  
  int i=0,j=0;
  int[] ans=new int[10000];

  while(!(op.equals("?"))){
  if(op.equals("+")) {
  ans[i]=a+b;
  }else if(op.equals("-")){
  ans[i]=a-b;
  }else if(op.equals("*")){
  ans[i]=a*b;
  }else{
  ans[i]=a/b;
  }
  i++;
  }

  while(j<i){
  System.out.println(ans[j]);
  j++;
  }
 }
}
 
  

Compiler output:
Main.java:7: error: incompatible types: int cannot be converted to String
  String op=System.in.read();
                          ^
1 error
Language: Java

import java.util.Scanner;

public class SimpleC{
 public static void main(String[] args){
  Scanner sc=new Scanner(System.in);
  
  int i=0,j=0;
  int[] ans=new int[10000];
  String op=" "; 
   
  while(!(op.equals("?"))){
   
  int a=sc.nextInt();
  op=sc.next();
  int b=sc.nextInt();

  if(op.equals("+")) {
  ans[i]= a + b;
  }else if(op.equals("-")){
  ans[i]= a - b;
  }else if(op.equals("*")){
  ans[i]= a * b;
  }else if(op.equals("/")){
  ans[i]= a / b;
  }
  i++;
  }

  while(j<i-1){
  System.out.println(ans[j]);
  j++;
  }
 }
}
 
  

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

import java.util.Scanner;

public class SimpleC{
 public static void main(String[] args){
  Scanner sc=new Scanner(System.in);
  
  int i=0,j=0;
  /*?§????????????£?¨??????????????????????????????°??????10000??¨?????????*/
  int[] ans=new int[10000];
  /*operator????????????????????????????¨????*/
  String op=" "; 
   
  /*op???0???????´???????????????§*/
  while(!(op.equals("?"))){
   
   /*a,op(?????????),b???????¬?????´?*/
   int a=sc.nextInt();
   op=sc.next();
   int b=sc.nextInt();

   /*op??????????????????????¨?????????´?????????*/
   if(op.equals("+")) {
    ans[i]= a + b;
   }else if(op.equals("-")){
    ans[i]= a - b;
   }else if(op.equals("*")){
    ans[i]= a * b;
   }else if(op.equals("/")){
    ans[i]= a / b;
   }
   
   /*??????????????????????????????*/
   i++;

  }

???/*??????????????????????????????op???????????´?????????????????????§?????????????????????while(j<i-1)*/
  while(j<i-1){
   System.out.println(ans[j]);
   j++;
  }
 }
}
 

Compiler output:
Main.java:37: error: illegal start of expression
???/*??????????????????????????????op???????????????????????????????????????????????????????while(j<i-1)*/
^
Main.java:37: error: illegal start of expression
???/*??????????????????????????????op???????????????????????????????????????????????????????while(j<i-1)*/
 ^
Main.java:37: error: illegal start of expression
???/*??????????????????????????????op???????????????????????????????????????????????????????while(j<i-1)*/
  ^
Main.java:38: error: illegal start of expression
  while(j<i-1){
  ^
4 errors
Language: Java

import java.util.Scanner;

public class Main{
 public static void main(String[] args){
  Scanner sc=new Scanner(System.in);
  
  int i=0,j=0;
  //?§????????????£?¨??????????????????????????????°??????10000??¨?????????
  int[] ans=new int[10000];
  //operator????????????????????????????¨????
  String op=" "; 

  //op???0???????´???????????????§
  while(!(op.equals("?"))){

   //a,op(?????????),b???????¬?????´?
   int a=sc.nextInt();
   op=sc.next();
   int b=sc.nextInt();

   //op??????????????????????¨?????????´?????????
   if(op.equals("+")) {
    ans[i]= a + b;
   }else if(op.equals("-")){
    ans[i]= a - b;
   }else if(op.equals("*")){
    ans[i]= a * b;
   }else if(op.equals("/")){
    ans[i]= a / b;
   }
   
   //??????????????????????????????
   i++;

  }

???//??????????????????????????????op???????????´?????????????????????§?????????????????????while(j<i-1)
  while(j<i-1){
   System.out.println(ans[j]);
   j++;
  }
 }
}
 

Compiler output:
Main.java:37: error: illegal start of expression
???//??????????????????????????????op???????????????????????????????????????????????????????while(j<i-1)
^
Main.java:37: error: illegal start of expression
???//??????????????????????????????op???????????????????????????????????????????????????????while(j<i-1)
 ^
Main.java:37: error: illegal start of expression
???//??????????????????????????????op???????????????????????????????????????????????????????while(j<i-1)
  ^
Main.java:38: error: illegal start of expression
  while(j<i-1){
  ^
4 errors
Language: Java

import java.util.Scanner;

public class Main{
 public static void main(String[] args){
  Scanner sc=new Scanner(System.in);
  
  int i=0,j=0;
  //?§????????????£?¨??????????????????????????????°??????10000??¨?????????
  int[] ans=new int[10000];
  //operator????????????????????????????¨????
  String op=" "; 

  //op???0???????´???????????????§
  while(!(op.equals("?"))){

   //a,op(?????????),b???????¬?????´?
   int a=sc.nextInt();
   op=sc.next();
   int b=sc.nextInt();

   //op??????????????????????¨?????????´?????????
   if(op.equals("+")) {
    ans[i]= a + b;
   }else if(op.equals("-")){
    ans[i]= a - b;
   }else if(op.equals("*")){
    ans[i]= a * b;
   }else if(op.equals("/")){
    ans[i]= a / b;
   }
   
   //??????????????????????????????
   i++;

  }

???//??????????????????????????????op???????????´?????????????????????§?????????????????????while(j<i-1)
  while(j<i-1){
  System.out.println(ans[j]);
  j++;
  }
 }
}
 

Compiler output:
Main.java:37: error: illegal start of expression
???//??????????????????????????????op???????????????????????????????????????????????????????while(j<i-1)
^
Main.java:37: error: illegal start of expression
???//??????????????????????????????op???????????????????????????????????????????????????????while(j<i-1)
 ^
Main.java:37: error: illegal start of expression
???//??????????????????????????????op???????????????????????????????????????????????????????while(j<i-1)
  ^
Main.java:38: error: illegal start of expression
  while(j<i-1){
  ^
4 errors
Language: Java

import java.util.Scanner;

public class Main{
 public static void main(String[] args){
  Scanner sc=new Scanner(System.in);
  
  int i=0,j=0;
  //?§????????????£?¨??????????????????????????????°??????10000??¨?????????
  int[] ans=new int[10000];
  //operator????????????????????????????¨????
  String op=" "; 

  //op???0???????´???????????????§
  while(!(op.equals("?"))){

   //a,op(?????????),b???????¬?????´?
   int a=sc.nextInt();
   op=sc.next();
   int b=sc.nextInt();

   //op??????????????????????¨?????????´?????????
   if(op.equals("+")) {
    ans[i]= a + b;
   }else if(op.equals("-")){
    ans[i]= a - b;
   }else if(op.equals("*")){
    ans[i]= a * b;
   }else if(op.equals("/")){
    ans[i]= a / b;
   }
   
   //??????????????????????????????
   i++;

  }

???//??????????????????????????????op???????????´?????????????????????§?????????????????????(j<i-1)
  while(j<i-1){
  System.out.println(ans[j]);
  j++;
  }
 }
}
 

Compiler output:
Main.java:37: error: illegal start of expression
???//??????????????????????????????op???????????????????????????????????????????????????????(j<i-1)
^
Main.java:37: error: illegal start of expression
???//??????????????????????????????op???????????????????????????????????????????????????????(j<i-1)
 ^
Main.java:37: error: illegal start of expression
???//??????????????????????????????op???????????????????????????????????????????????????????(j<i-1)
  ^
Main.java:38: error: illegal start of expression
  while(j<i-1){
  ^
4 errors
Language: Java

import java.util.Scanner;

public class SimpleC{
 public static void main(String[] args){
  Scanner sc=new Scanner(System.in);
  
  int i=0,j=0;
  /*?§????????????£?¨??????????????????????????????°??????10000??¨?????????*/
  int[] ans=new int[10000];
  /*operator????????????????????????????¨????*/
  String op=" "; 
   
  /*op???0???????´???????????????§*/
  while(!(op.equals("?"))){
   
   /*a,op(?????????),b???????¬?????´?*/
   int a=sc.nextInt();
   op=sc.next();
   int b=sc.nextInt();

   /*op??????????????????????¨?????????´?????????*/
   if(op.equals("+")) {
    ans[i]= a + b;
   }else if(op.equals("-")){
    ans[i]= a - b;
   }else if(op.equals("*")){
    ans[i]= a * b;
   }else if(op.equals("/")){
    ans[i]= a / b;
   }
   
   /*??????????????????????????????*/
   i++;

  }

 /*??????????????????????????????op???????????´?????????????????????§?????????????????????while(j<i-1)*/
  while(j<i-1){
   System.out.println(ans[j]);
   j++;
  }
 }
}

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

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

class Main {
    public static void main(String [] args){
        Scanner scan = new Scanner(System.in);
        
        while(true){
            int a   = scan.nextInt();
            char op = scan.next().charAt(0);
            int b   = scan.nextInt();
            
            if(op == '?'){
                break;
            }
            
            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;
            }
        }
    }
}?????????

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

import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class Main {

	private class Line {

		public long a;
		public long b;
		public char op;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		List<Line> list = new LinkedList<Line>();
		while (sc.hasNext()) {
			Line line = new Line();
			line.a = sc.nextLong();
			line.op = sc.next().charAt(0);
			line.b = sc.nextLong();
			list.add(line);
		}
		for (Line line : list) {
			switch (line.op) {
				case '+':
					System.out.println(line.a + line.b);
				case '-':
					System.out.println(line.a - line.b);
				case '*':
					System.out.println(line.a * line.b);
				case '/':
					System.out.println(line.a / line.b);
			}
		}
	}
}

Compiler output:
Main.java:18: error: non-static variable this cannot be referenced from a static context
			Line line = new Line();
			            ^
1 error
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a, b, res;
    char op;
    while (true) {
      a  = sc.nextInt();
      op = sc.nextChar();
      b  = sc.nextInt();
      if (op equals(+)) {
        res = a+b;
      }
      else if (op equals(-)) {
        res = a-b;
      }
      else if (op equals(*)) {
        res = a*b;
      }
      else if (op equals(/)) {
        res = a/b;
      }
      else {
        break;
      }
      System.out.println(res);
    }
  }
}

Compiler output:
Main.java:11: error: ')' expected
      if (op equals(+)) {
            ^
Main.java:11: error: illegal start of expression
      if (op equals(+)) {
                     ^
Main.java:11: error: ';' expected
      if (op equals(+)) {
                      ^
Main.java:14: error: ')' expected
      else if (op equals(-)) {
                 ^
Main.java:14: error: illegal start of expression
      else if (op equals(-)) {
                          ^
Main.java:14: error: ';' expected
      else if (op equals(-)) {
                           ^
Main.java:14: error: 'else' without 'if'
      else if (op equals(-)) {
      ^
Main.java:17: error: ')' expected
      else if (op equals(*)) {
                 ^
Main.java:17: error: illegal start of expression
      else if (op equals(*)) {
                         ^
Main.java:17: error: illegal start of expression
      else if (op equals(*)) {
                          ^
Main.java:17: error: ';' expected
      else if (op equals(*)) {
                           ^
Main.java:17: error: 'else' without 'if'
      else if (op equals(*)) {
      ^
Main.java:20: error: ')' expected
      else if (op equals(/)) {
                 ^
Main.java:20: error: illegal start of expression
      else if (op equals(/)) {
                         ^
Main.java:20: error: illegal start of expression
      else if (op equals(/)) {
                          ^
Main.java:20: error: ';' expected
      else if (op equals(/)) {
                           ^
Main.java:20: error: 'else' without 'if'
      else if (op equals(/)) {
      ^
Main.java:23: error: 'else' without 'if'
      else {
      ^
18 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a, b, res;
    char op;
    while (true) {
      a  = sc.nextInt();
      op = sc.nextChar();
      b  = sc.nextInt();
      if (op.equals(+)) {
        res = a+b;
      }
      else if (op.equals(-)) {
        res = a-b;
      }
      else if (op.equals(*)) {
        res = a*b;
      }
      else if (op.equals(/)) {
        res = a/b;
      }
      else {
        break;
      }
      System.out.println(res);
    }
  }
}

Compiler output:
Main.java:11: error: illegal start of expression
      if (op.equals(+)) {
                     ^
Main.java:14: error: illegal start of expression
      else if (op.equals(-)) {
                          ^
Main.java:17: error: illegal start of expression
      else if (op.equals(*)) {
                         ^
Main.java:17: error: illegal start of expression
      else if (op.equals(*)) {
                          ^
Main.java:20: error: illegal start of expression
      else if (op.equals(/)) {
                         ^
Main.java:20: error: illegal start of expression
      else if (op.equals(/)) {
                          ^
6 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a, b, res;
    char op;
    while (true) {
      a  = sc.nextInt();
      op = sc.nextChar();
      b  = sc.nextInt();
      if (op.equals("+")) {
        res = a+b;
      }
      else if (op.equals("-")) {
        res = a-b;
      }
      else if (op.equals("*")) {
        res = a*b;
      }
      else if (op.equals("/")) {
        res = a/b;
      }
      else {
        break;
      }
      System.out.println(res);
    }
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
      op = sc.nextChar();
             ^
  symbol:   method nextChar()
  location: variable sc of type Scanner
Main.java:11: error: char cannot be dereferenced
      if (op.equals("+")) {
            ^
Main.java:14: error: char cannot be dereferenced
      else if (op.equals("-")) {
                 ^
Main.java:17: error: char cannot be dereferenced
      else if (op.equals("*")) {
                 ^
Main.java:20: error: char cannot be dereferenced
      else if (op.equals("/")) {
                 ^
5 errors
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a, b, res;
    String op;
    while (true) {
      a  = sc.nextInt();
      op = sc.next();
      b  = sc.nextInt();
      if (op.equals(+)) {
        res = a+b;
      }
      else if (op.equals(-)) {
        res = a-b;
      }
      else if (op.equals(*)) {
        res = a*b;
      }
      else if (op.equals(/)) {
        res = a/b;
      }
      else {
        break;
      }
      System.out.println(res);
    }
  }
}

Compiler output:
Main.java:11: error: illegal start of expression
      if (op.equals(+)) {
                     ^
Main.java:14: error: illegal start of expression
      else if (op.equals(-)) {
                          ^
Main.java:17: error: illegal start of expression
      else if (op.equals(*)) {
                         ^
Main.java:17: error: illegal start of expression
      else if (op.equals(*)) {
                          ^
Main.java:20: error: illegal start of expression
      else if (op.equals(/)) {
                         ^
Main.java:20: error: illegal start of expression
      else if (op.equals(/)) {
                          ^
6 errors
Language: Java

import java.util.Scanner;

class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		String[] str = sc.nextLine().split(" ");
		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[2]);
		String op = str[1];
		int i;
		
		for (;;)
		{
			if (op == "?")
			{
				break;
			}
			
			if (op == "+")
			{
				i = a + b;
			}
			else if (op == "-")
			{
				i = a - b;
			}
			else if (op == "*")
			{
				i = a * b;
			}
			else if (op == "/")
			{
				i = a / b;
			}
			
			System.out.println(i);
		}
	}
}

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