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

#include <iostream>

int main()
{
  long long int a, b, ans;
  char op;

  std::cin >> a >> op >> b;

  if (op == '+') {
    ans = a + b;
  } else {
    ans = a - b;
  }

  std::cout << ans << std::endl;

  return 0;
}


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

#include <bits/stc++.h>
using namespace std;
int main()
{
  int a ;
  int b ;
  char c;
  
  scanf("%d %c %d",&a, &c, &b);
  
  if(c == '+')
  {
    cout << a+b ;
  }
  else
  {
    cout << a-b ;
  }
}

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

#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;char o;cin >> a >> o >> b;
  if (op == '+') cout << a + b << endl;
   else cout << a - b << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: 'op' was not declared in this scope; did you mean 'o'?
    5 |   if (op == '+') cout << a + b << endl;
      |       ^~
      |       o
Language: C++

#include <iostream>
using namespace std;
int main(){
int a,b;
char op;
cin>>a>>op>>b;
if(‘+’==op){
cout<<a+b;
}else{
cout<<a-b;
}
return 0;
}

Compiler output:
a.cc:7:4: error: extended character ‘ is not valid in an identifier
    7 | if(‘+’==op){
      |    ^
a.cc:7:6: error: extended character ’ is not valid in an identifier
    7 | if(‘+’==op){
      |      ^
a.cc: In function 'int main()':
a.cc:7:4: error: '\U00002018' was not declared in this scope
    7 | if(‘+’==op){
      |    ^
a.cc:7:6: error: '\U00002019' was not declared in this scope
    7 | if(‘+’==op){
      |      ^
Language: C++

#include <iostream>
using namespace std ;
int main()
{
    int A , B ;
    char x ;
    cin >> A >> B  ;
    cin >> x ;
    int subs = A - B ;
    int adds = A + B ;
    if (A >= 1 && B <= 10e9){
        if (x == " + ")
            cout << adds ;
        if (x == " - ")
            cout << subs ;


    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if (x == " + ")
      |             ~~^~~~~~~~
a.cc:14:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |         if (x == " - ")
      |             ~~^~~~~~~~
Language: C++

int A , B ;
    char x ;
    cin >> A >> B >> x ;
    if (A >= 1 && B <= 10^9){
        if (x == "+")
            cout << A+B ;
        else if (x == "-")
            cout << A-B ;


    }

Compiler output:
a.cc:3:5: error: 'cin' does not name a type
    3 |     cin >> A >> B >> x ;
      |     ^~~
a.cc:4:5: error: expected unqualified-id before 'if'
    4 |     if (A >= 1 && B <= 10^9){
      |     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int A,B;
  char op;
  cin>>A>>op>>B;
  cout<<(A+(op=='+'?1?-1)*B)<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: expected ':' before ')' token
    7 |   cout<<(A+(op=='+'?1?-1)*B)<<endl;
      |                         ^
      |                         :
a.cc:7:25: error: expected primary-expression before ')' token
a.cc:7:25: error: expected ':' before ')' token
    7 |   cout<<(A+(op=='+'?1?-1)*B)<<endl;
      |                         ^
      |                         :
a.cc:7:25: error: expected primary-expression before ')' token
Language: C

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

#define MAX(a,b) (a > b) ? a : b
#define MIN(a,b) (a < b) ? a : b
const int inf = 1000000000; // 10^9

int main(){
   int a,b;
   char op;scanf("%d %c %d",&a,&op,&b);
   if(op == '+')printf("%ld",a+b);
   else printf("%d",a-b)
}


Compiler output:
main.c: In function 'main':
main.c:13:25: error: expected ';' before '}' token
   13 |    else printf("%d",a-b)
      |                         ^
      |                         ;
   14 | }
      | ~
Language: C

#include <iostream>
using namespace std;

int main()
{
    int A, B;
    char op;

    cin >> A >> op >> B;

    if (op == '+') {
        cout << A + B;
    } else {
        cout << A - B;
    }

}

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

#include <iostream>
using namespace std;
int main()
  {
  int A,B ;
  cin >> A,B ;
  int sum =A+B;
  int subtraction A-B ;
  cout << sum << endl;
  cout << subtraction << endl;
  
  return 0 ;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected initializer before 'A'
    8 |   int subtraction A-B ;
      |                   ^
a.cc:10:11: error: 'subtraction' was not declared in this scope
   10 |   cout << subtraction << endl;
      |           ^~~~~~~~~~~
Language: C++

#include <iostream>
using namesoace std ;
int main()
  {
  int A,B ;
  cin>> A,B ;
  int sum =A+B ;
  int subtraction =A-B;
  cout << sum <<endl;
  cout << subtraction << endl;
  
  return 0;
  }

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesoace'
    2 | using namesoace std ;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>> A,B ;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout << sum <<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout << sum <<endl;
      |                 ^~~~
      |                 std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int A,B = 0;
  char op = '';
  cin >> A >> op >> B;
  
  if(op=='+')
    cout << A+B << endl;
  else
    cout << A-B << endl;
}

Compiler output:
a.cc:6:13: error: empty character constant
    6 |   char op = '';
      |             ^~
Language: C++

import java.util.*;
public class Main {
 
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    String inputTxt = sc.nextLine();

    int ans = 0;
    String[] arrTxt = inputTxt.split(" ");
    int left = Integer.parseInt(arrTxt[0]);
    int right = Integer.parseInt(arrTxt[2]);
    if ("+".equals(arrTxt[1])) {
      ans = left + right;
    } else {
      ans = left - right;
    }
    System.out.println(ans);
  }
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main(){
 int A,B;
 string op;
  cin>>A>>op>>B;
  cout<<AopB<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'AopB' was not declared in this scope; did you mean 'op'?
    8 |   cout<<AopB<<endl;
      |         ^~~~
      |         op
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
 int A,B;
 char op;
  cin>>A>>op>>B;
  cout<<AopB<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'AopB' was not declared in this scope; did you mean 'op'?
    8 |   cout<<AopB<<endl;
      |         ^~~~
      |         op
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main(){
 int A,B,op;
  cin>>A>>op>>B;
  cout<<AopB<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'AopB' was not declared in this scope; did you mean 'op'?
    7 |   cout<<AopB<<endl;
      |         ^~~~
      |         op
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int a, b;
    char op;
    cin >> a , op , b;
    if(op == "+")
        cout << a + b;
    else
        cout << a - b;



    return 0;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if(op == "+")
      |        ~~~^~~~~~
Language: C++

int a, b;
string op;
cin >> a >> op >> b;

if (op == "+")
  return a + b;
else
  return a - b;

Compiler output:
a.cc:2:1: error: 'string' does not name a type
    2 | string op;
      | ^~~~~~
a.cc:3:1: error: 'cin' does not name a type
    3 | cin >> a >> op >> b;
      | ^~~
a.cc:5:1: error: expected unqualified-id before 'if'
    5 | if (op == "+")
      | ^~
a.cc:7:1: error: expected unqualified-id before 'else'
    7 | else
      | ^~~~
Language: C++

#include<iostream>

using namespace std;

int main(){
  char op;
  int a,b;
  cin>>a>>op>>b;
  if(c=='+')cout<<a+b;
  else cout<<a-b;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 'c' was not declared in this scope
    9 |   if(c=='+')cout<<a+b;
      |      ^
Language: C++

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

int main(){
    int A,B;
    char op;
    cin>>A>>op>>B;
    if(c=='+')      cout<<A+B<<endl;
    else if(c=='-') cout<<A-B<<endl;
    else            return 0;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'c' was not declared in this scope
    8 |     if(c=='+')      cout<<A+B<<endl;
      |        ^
Language: C++

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

int main() {

    int A,B;
    char op;
    cin >> A >> op >> B;

    if( op ='+'){

    cout << A+B << endl;
    }

    else (op = '-'){
    
    cout << A-B << endl;
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:20: error: expected ';' before '{' token
   15 |     else (op = '-'){
      |                    ^
      |                    ;
Language: C++

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

int main() {
  int A, B;
  string op;
  cin >> A >> op >> B;
  
  if (op == "-"){
   cout << A - B << endl;
  }
  else (op == "+"){
    cout << A + B << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: expected ';' before '{' token
   12 |   else (op == "+"){
      |                   ^
      |                   ;
a.cc:12:12: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   12 |   else (op == "+"){
      |        ~~~~^~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
Language: C

#include<stdio.h>
int main()
{
    int a,b;
    char c;
    scanf("%d%c%d",&a,&c,&b);
    if(c=='+')pritnf("%d\n",a+b);
    else printf("%d\n",a-b);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:15: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    7 |     if(c=='+')pritnf("%d\n",a+b);
      |               ^~~~~~
      |               printf
Language: C

#include<stdio.h>
int main()
{
    int a,b;
    char c;
    scanf("%d%c%d",&a,&c,&b);
    if(c=='+')pritnf("%d\n",a+b);
    else pritnf("%d\n",a-b);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:15: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    7 |     if(c=='+')pritnf("%d\n",a+b);
      |               ^~~~~~
      |               printf
Language: C

#include<stdio.h>
using namespace std;
int main()
{
    int a,b;
    char c;
    scanf("%d%c%d",&a,&c,&b);
    if(c=='+')pritnf("%d\n",a+b);
    else pritnf("%d\n",a-b);
    return 0;
}

Compiler output:
main.c:2:1: error: unknown type name 'using'
    2 | using namespace std;
      | ^~~~~
main.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    2 | using namespace std;
      |                 ^~~
main.c: In function 'main':
main.c:8:15: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    8 |     if(c=='+')pritnf("%d\n",a+b);
      |               ^~~~~~
      |               printf
Language: C++

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

int main() {
  int A,B;
  string op;
  cin >> A >> op >> B;
  
  if(op = "+")
    cout << A+B << endl;
  else
    cout << A-B << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"+"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    9 |   if(op = "+")
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
Language: C++

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

int main() {
  int A, B;
  char op;
  cin >> A >> op >> C;
  
  if(op == '+'){
    cout << A + B << endl;
  }
  else{
    cout << A - B << endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'C' was not declared in this scope
    7 |   cin >> A >> op >> C;
      |                     ^
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b;
    char oper;
    bool type;
    cin>>a>>oper>>b;
    if(oper=="+") type=true; else type=false;
    if(type) cout<<a+b<<endl; else cout<<a-b<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(oper=="+") type=true; else type=false;
      |        ~~~~^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int a,b;
    char oper;
    bool type;
    cin>>a>>oper>>b;
    if(oper=="+") type=1;
    else type=0;
    if(type) cout<<a+b<<endl;
    else cout<<a-b<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(oper=="+") type=1;
      |        ~~~~^~~~~
Language: C++

a=int(input())
b=int(input())
add="+"
sub="-"
op=str(input())
if (op==add):
    print(a+b)
elif(op==sub):
    print(a-b)
else:
 print("error")


Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a=int(input())
      | ^
Language: C++

#include<iostream>
#include<cstdlib>
#include<map>
#include<cmath>

using namespace std;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n;
    cin >> n;

    map<int, int> counter;
    int num;
    for(int i=0;i<n;i++){
        cin >> num;
        if(counter[num] == 0){
            counter[num] = 1;
        }else{
            counter[num]++;
        }

        if(n % 2 == 0 && num%2 == 0){
            cout << 0 << endl;
            return 0;
        }else if(n%2 != 0 && num%2 != 0){
            cout << 0 <<endl;
            return 0;
        }

        if(num == 0 && counter[0] > 1){
            cout << 0 << endl;
            return 0;
        }else if(counter[num] > 2){
            cout << 0 << endl;
            return 0;
        }
    }

    cout << std::pow(2, n/2)%(std::pow(20, 9)+7) << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:29: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and '__gnu_cxx::__promote<double>::__type' {aka 'double'} to binary 'operator%'
   42 |     cout << std::pow(2, n/2)%(std::pow(20, 9)+7) << endl;
      |             ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
      |                     |                        |
      |                     |                        __gnu_cxx::__promote<double>::__type {aka double}
      |                     __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <iostream>
using namespace std;
int main() {
    int x=0;
    int a,b;
    cin>>a>>b;
    x=a+b;
    cout<<x;
    return 0;


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

#include <iostream>

using namespace std;

int main() {
  int A,B; char op;
  cin >> A>>op>> b;
  if (op=='+') cout<<A+B;
  else if (op=='-') cout<<A-B;
  
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: 'b' was not declared in this scope
    7 |   cin >> A>>op>> b;
      |                  ^
Language: Java

import java.util.*;
public class Main{
    public static void main(String args[]) {
      Scanner in = new Scanner(System.in);
      int A = in.nextInt();
      String op = in.next();
      int B = in.nextInt();
      if (op.equals("+"))
        System.out.println(A+N);
      else if (op.equals("-")
        System.out.println(A-N);
    }
}

Compiler output:
Main.java:10: error: ')' expected
      else if (op.equals("-")
                             ^
1 error
Language: C++

int a, b;
string op;
cin >> a >> op >> b;
if(op == "+")
  cout << a + b << endl;
else
  cout << a-b << endl;

Compiler output:
a.cc:2:1: error: 'string' does not name a type
    2 | string op;
      | ^~~~~~
a.cc:3:1: error: 'cin' does not name a type
    3 | cin >> a >> op >> b;
      | ^~~
a.cc:4:1: error: expected unqualified-id before 'if'
    4 | if(op == "+")
      | ^~
a.cc:6:1: error: expected unqualified-id before 'else'
    6 | else
      | ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
    int a,b;
    cin>>a>>b;
    int sub,sum;
    char c;
    sum=a+b;
    sub=a-b;
    if (c=='+') {
        cout<<sum<<endl;
    |}else{
        cout<<sub<<endl;
      }   
    return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
    int a,b;
    cin>>a>>b;
    int sub,sum;
    char c;
    sum=a+b;
    sub=a-b
    if (c=='+') 
        cout<<sum<<endl;
    else
        cout<<sub<<endl;
        
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before 'if'
   10 |     sub=a-b
      |            ^
      |            ;
   11 |     if (c=='+')
      |     ~~      
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B;
  char op;
  int result;
  cin >> A >> op >> B;
  if (op == '+'){
    result = A + B;
  }
  else if (op == '-'){
    result = A - B;
  }
  cout << result << endl;
}
}

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

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

int main() {
int A,B;
char op;
cin>>A>>op>>B;

if(op=="+"){
cout<<A+B<<endl;
}
else{
cout<<A-B<<endl;
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 | if(op=="+"){
      |    ~~^~~~~
Language: C++

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

int main() {
int A,B;
char op;
cin>>A>>op>>B;

if(op=="+"){
cout<<A+B<<endl;
}
else{
cout<<A-B<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 | if(op=="+"){
      |    ~~^~~~~
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;
int main()
{
    char input;
    int num1, num2;
    cin >> num1;
    cin >> num2;
    cin >> input;
    if (input == "+")
    {
        cout << num1 + num2;
    }

    else if (input == "-")
    {
        cout << num1 - num2;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (input == "+")
      |         ~~~~~~^~~~~~
a.cc:15:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |     else if (input == "-")
      |              ~~~~~~^~~~~~
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    String op = sc.next();
    String b = sc.next();
    long a = Long.parseLong(a);
    long b = Long.parseLong(b);
    long ans = a + b;
    if(op.equals("-")) ans = a - b;
    System.out.println(ans);
  }
}

Compiler output:
Main.java:9: error: variable a is already defined in method main(String[])
    long a = Long.parseLong(a);
         ^
Main.java:9: error: incompatible types: long cannot be converted to String
    long a = Long.parseLong(a);
                            ^
Main.java:10: error: variable b is already defined in method main(String[])
    long b = Long.parseLong(b);
         ^
Main.java:10: error: incompatible types: long cannot be converted to String
    long b = Long.parseLong(b);
                            ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
4 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A,B;
  string op;

cin >> A >> op >> B ;

if( op == "+"){

  

  
}

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

#include <bits/stdc++.h>
#define rep(i,n) for(int64_t i=0;i < (int64_t)(n);i++)
using namespace std;

//////全探索したいときに開けよ////////
vector<vector<int>> fspattern;
vector<int> fspattern_draft;
int fspcnt = 0;

void setfspattern_core(int floor,int number,int degree){
  if(floor==degree){
    fspattern.at(fspcnt) = fspattern_draft;
    fspcnt++;
  }else{
    rep(i,number){
      fspattern_draft.at(floor) = i;
      setfspattern_core(floor+1,number,degree);
    }
  }
}

void setfspattern(int number,int degree){
  int64_t array_num = 1;
  rep(i,degree){
    array_num *= number;
  }
  fspattern = vector<vector<int>>(array_num,vector<int>(degree));
  fspattern_draft = vector<int>(degree);
  setfspattern_core(0,number,degree);
}

//////nCrのmodを求めたいときに開けよ/////////
//int64_t univMod = 1000000007;
//int64_t factnum = 100000
//vector<int64_t> modfact(factnum);
//vector<int64_t> modinvfact(factnum);

/*void setmodfact(){
  for(int i=0;i<factnum;i++){
    if(i == 0){
      modfact.at(i) = 1;
    }else{
      modfact.at(i) = (modfact.at(i-1)*i)%univMod;
    }
  }
}

int64_t calcmodpower(int64_t a,int64_t n){
  int64_t res = 1;
  while(n != 0){
    if(n & 1){
      res = (res * a) % univMod;
    }
    a = (a*a) % univMod;
    n = n >> 1;
  }
  return res;
}

int64_t calcinverse(int64_t n){
	return calcmodpower(n,univMod-2);
}

void setmodinvfact(){
  for(int i=0;i<factnum;i++){
    if(i==0){
      modinvfact.at(i) = 1;
    }else{
      modinvfact.at(i) = calcmodpower(modfact.at(i),univMod-2);
    }
  }
}

int64_t calcmodcomb(int64_t n,int64_t r){
  return (((modfact.at(n)*modinvfact.at(r))%univMod)*modinvfact.at(n-r))%univMod;
}

int64_t calcmodpositive(int64_t n){
  return (n + ((abs(n)+univMod-1)/univMod)*univMod)%univMod;
}
  
    */


/*
int64_t calcGCD(int64_t a,int64_t b){
	int64_t p = a;
	int64_t q = b;
	int64_t c = a%b;
	while(c != 0){
		p = q;
		q = c;
		c = p%q;
	}
	return q;
}
*/

int main(){
  int64_t a,b;
  char op;
  cin >> a >> op >> b;
  if(op == '+'){
    cout << a+b << endl;
  }else{
    cout << a-b << endl;
  }
    
}


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

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

int main() {
  int a,b;
  string op;
  cin zz. a >> b >> op;
  if (op == "+") {
    cout << a + b << endl;
  }
  else if (op == "-") {
    cout << a - b << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected ';' before 'zz'
    7 |   cin zz. a >> b >> op;
      |      ^~~
      |      ;
Language: C++

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

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

  if(op=="+")
        cout << a+b << endl;
  else
        cout << a-b <<endl;
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if(op=="+")
      |      ~~^~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
  int A,C;
  string B;
  cin A >> B >> C;
  if(B=="+"){
    cout << A+C << endl;
  }
  else{
	cout << A-C << endl;
  }
  
}


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

#include <iostream>
#include <string>
 
int main() {
  std int a,c;
  std::string b;
  std::cin >>a>>b>>c;
  
  if(b == "+"){
  	std::cout<<a+c;
  }else if(b == "-"){
  	std::cout<<a-c;
  }else{}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected primary-expression before 'int'
    5 |   std int a,c;
      |       ^~~
a.cc:7:14: error: 'a' was not declared in this scope
    7 |   std::cin >>a>>b>>c;
      |              ^
a.cc:7:20: error: 'c' was not declared in this scope
    7 |   std::cin >>a>>b>>c;
      |                    ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
using namespace std;
int main() {
  string x,y,z;
  cin>>x>>z>>y;
  if (z == "+") cout<<atoi(x)+atoi(y)<<endl;
  else cout<<atoi(x)-atoi(y)<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   14 |   if (z == "+") cout<<atoi(x)+atoi(y)<<endl;
      |                            ^
      |                            |
      |                            std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/c++/14/ext/string_conversions.h:43,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:14:36: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   14 |   if (z == "+") cout<<atoi(x)+atoi(y)<<endl;
      |                                    ^
      |                                    |
      |                                    std::string {aka std::__cxx11::basic_string<char>}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:15:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   15 |   else cout<<atoi(x)-atoi(y)<<endl;
      |                   ^
      |                   |
      |                   std::string {aka std::__cxx11::basic_string<char>}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:15:27: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   15 |   else cout<<atoi(x)-atoi(y)<<endl;
      |                           ^
      |                           |
      |                           std::string {aka std::__cxx11::basic_string<char>}
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: Java

import java.util.*;

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

    int a = sc.nextInt();
    char op = sc.nextchar();
    int b = sc.nextInt();

    System.out.println(op=='+' ? a+b:a-b);
  }
}


Compiler output:
Main.java:8: error: cannot find symbol
    char op = sc.nextchar();
                ^
  symbol:   method nextchar()
  location: variable sc of type Scanner
1 error
Language: Java

import java.util.*;

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();

    System.out.println(op=='+' ? a+b:a-b);
  }
}


Compiler output:
Main.java:11: error: bad operand types for binary operator '=='
    System.out.println(op=='+' ? a+b:a-b);
                         ^
  first type:  String
  second type: char
1 error
Language: C++

package main


import (
    "fmt"
)

func main() {
    var A,B int
    var op string

    fmt.Scan(&A,&op,&B)

    if op == "+" {
      fmt.Println(A+B)

    } else if op == "-" {
      fmt.Println(A-B)

    } else {
      fmt.Println("error")
    }

}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

#pragma gcc optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(V) (V).begin(),(V).end()
#define SORT(V) sort(ALL(V)) //小さい方からソート
#define REV(V) reverse(ALL(V)) //リバース
#define RSORT(V) SORT(V);REV(V) //大きい方からソート
#define NPN(V) next_permutation(ALL(V)) //順列
#define pb(n) push_back(n)
#define endl '\n'
#define Endl '\n'
#define DUMP(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define Yay(n) cout << ((n) ? "Yay!": ":(") << endl
#define RAPID cin.tie(0);ios::sync_with_stdio(false)
#define IN(n) cin >> n
#define IN2(a,b) cin >> a >> b
#define IN3(a,b,c) cin >> a >> b >> c 
#define IN4(a,b,c,d) cin >> a >> b >> c >> d
#define VIN(V) for(int i = 0; i < (V).size(); i++) {cin >> (V).at(i);}
#define OUT(n) cout << n << endl
#define VOUT(V) REP(i, (V).size()) {cout << (V)[i] << endl;}
#define VOUT2(V) REP(i, (V).size()) {cout << (V)[i] << " ";} cout<<endl;

// 型マクロ定義
#define int long long
#define P pair<ll,ll>
#define Vi vector<ll>
#define Vd vector<double>
#define Vs vector<string>
#define Vc vector<char>
#define M map<ll,ll>
#define S set<ll>
#define PQ priority_queue<ll>
#define PQG priority_queue<ll,V,greater<ll>
//

const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int gcd(int a,int b){return b?gcd(b,a%b):a;} //最小公倍数
string toStrUp(string str){char diff = 'A'-'a';REP(i,str.size()) str[i] += diff;return str;}
string gCh(string str, int key){return str.substr(key,1);}

signed main() {
  RAPID;
  // デフォルト変数定義
  int n,m,a,b,c,d,x,y,z;
  string s,t;
  //

  // ここから
  IN3(a,n,b);
  if(n=="+") OUT(a+b);
  else OUT(a-b);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:62:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   62 |   if(n=="+") OUT(a+b);
      |      ~^~~~~
Language: Java

import java.util.*;
 
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();
      	if(op.equals("+"){
          System.out.println(a + b);
        }else{
          System.out.println(a - b);
        }
    }
  
}

Compiler output:
Main.java:9: error: ')' expected
      	if(op.equals("+"){
      	                 ^
1 error
Language: Java

import java.util.Scanner;

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

    if (o.equals("+")) {
      System.out.println(a + b);
    } else {
      System.out.println(a - b);
    }
  }
}


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

#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define bg begin()
#define ed end()
#define all(x) x.bg, x.ed
#ifdef LOCAL
#define dmp(x) cerr << __LINE__ << " " << #x << " " << x << endl
#else
#define dmp(x) void(0)
#endif

template <class t, class u>
void chmax(t &a, u b)
{
  if (a < b)
    a = b;
}
template <class t, class u>
void chmin(t &a, u b)
{
  if (b < a)
    a = b;
}

template <class t>
using vc = vector<t>;
template <class t>
using vvc = vc<vc<t>>;

using vi = vc<int>;
int gcd(int a, int b)
{
  if (b == 0)
    return a;
  return gcd(b, a % b);
}
int lcm(int a, int b)
{
  return (a * b) / gcd(a, b);
}
int fact(int n)
{
  if (n == 0)
    return 1;
  return n * fact(n - 1);
}
int main()
{
  int a, b;
  char op;
  cin >> a;
  cin >> op;
  cin >>b;
  if(op=='+') cout << a+b<<endl;
  else cout << b-a <<endl;
}

Compiler output:
a.cc:28:12: error: 'vector' does not name a type
   28 | using vc = vector<t>;
      |            ^~~~~~
a.cc:30:13: error: 'vc' does not name a type
   30 | using vvc = vc<vc<t>>;
      |             ^~
a.cc:32:12: error: 'vc' does not name a type
   32 | using vi = vc<int>;
      |            ^~
a.cc: In function 'int main()':
a.cc:53:3: error: 'cin' was not declared in this scope
   53 |   cin >> a;
      |   ^~~
a.cc:56:15: error: 'cout' was not declared in this scope
   56 |   if(op=='+') cout << a+b<<endl;
      |               ^~~~
a.cc:56:28: error: 'endl' was not declared in this scope; did you mean 'ed'?
   56 |   if(op=='+') cout << a+b<<endl;
      |                            ^~~~
      |                            ed
a.cc:57:8: error: 'cout' was not declared in this scope
   57 |   else cout << b-a <<endl;
      |        ^~~~
a.cc:57:22: error: 'endl' was not declared in this scope; did you mean 'ed'?
   57 |   else cout << b-a <<endl;
      |                      ^~~~
      |                      ed
Language: C++

#include<bits/stdc++.h>
using nameapace std;
int main(){
  int A,B;
  char c;
  
  cin>>A>>c>>B;
  if(c=='+'){cout<<A+B<<endl;}
  else{cout<<A-B<<endl;}
  return 0;

}

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

#include<bits/stdc++.h>
using nameplace std;
int main(){
  int A,B;
  char c;
  
  cin>>A>>c>>B;
  if(c=='+'){cout<<A+B<<endl;}
  else{cout<<A-B<<endl;}
  return 0;

}

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

#include<bits/stdc++.h>
int main(){
  int A,B;
  char c;
  
  cin>>A>>c>>B;
  if(c=='+'){cout<<A+B<<endl;}
  else{cout<<A-B<<endl;}
  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>A>>c>>B;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |   if(c=='+'){cout<<A+B<<endl;}
      |              ^~~~
      |              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |   if(c=='+'){cout<<A+B<<endl;}
      |                         ^~~~
      |                         std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:8:8: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   else{cout<<A-B<<endl;}
      |        ^~~~
      |        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   else{cout<<A-B<<endl;}
      |                   ^~~~
      |                   std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <stdio.h>
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <deque>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <chrono>
#include <random>
#include <time.h>
#include <fstream>
#define ll long long
#define rep2(i,a,b) for(ll i=a;i<=b;++i)
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep3(i,a,b) for(ll i=a;i>=b;i--)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pq priority_queue<int>
#define pqg priority_queue<int,vector<int>,greater<int>>
#define pb emplace_back
#define vec vector<int>
#define vecll vector<ll>
#define vecpii vector<pii>
#define endl "\n"
#define all(c) begin(c),end(c)
using namespace std;
int in() {int x;scanf("%d",&x);return x;}
ll lin() {ll x;scanf("%lld",&x);return x;}
template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
void print(vec v){for(auto e:v)cout<<e<<" ";cout<<endl;}
void print(vecll v){for(auto e:v)cout<<e<<" ";cout<<endl;}
void print(vector<vec> v){for(auto e:v){for(auto ee:e)cout<<ee<<" ";cout<<endl;}}
void print(map<int,int> mp){for(auto e:mp)cout<<e.first<<" "<<e.second<<endl;cout<<endl;}
const int INF=1e6;
const ll int MOD=998244353;

main(){
    int a=in();
    char c;cin>>C;
    int b=in();
    if(c=='+')cout<<a+b;
    else cout<<a-b;
}

Compiler output:
a.cc:53:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   53 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:55:17: error: 'C' was not declared in this scope
   55 |     char c;cin>>C;
      |                 ^
Language: C++

#include <bits / stdc ++。h>
名前空間stdを使用します。

int main（）{
  int a、b;
  char op;
  cin >> a >> op >> b;
  if（op == '+'）{
    cout << a + b << endl;
  }
  そうしないと{
    cout << a-b << endl;
}


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

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

int main(){
  int a,b;
  char op;
  cin >> a >> op >> b;
  if(op == '+'){
    cout << a + B << endl;
  }
  else{
    cout << a - b << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'B' was not declared in this scope
    9 |     cout << a + B << endl;
      |                 ^
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C

#include<stdio.h>

int main()
{
int a,b;
char s;
scanf("%d\n",&a);
scanf("%c",&s);
scanf("%d",&b);
if(s=='+')
&#160;printf("%d\n",a+b);
else
&#160;printf("%d\n",a-b);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:2: error: stray '#' in program
   11 | &#160;printf("%d\n",a+b);
      |  ^
main.c:11:1: error: lvalue required as unary '&' operand
   11 | &#160;printf("%d\n",a+b);
      | ^
main.c:12:1: error: 'else' without a previous 'if'
   12 | else
      | ^~~~
main.c:13:2: error: stray '#' in program
   13 | &#160;printf("%d\n",a-b);
      |  ^
main.c:13:1: error: lvalue required as unary '&' operand
   13 | &#160;printf("%d\n",a-b);
      | ^
Language: C++

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

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

  int answer = 0;
  if( s == '+') {
   answer = a + b;
  } else {
   answer =  a - b;
  }
  cout << answer << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: expected ';' before 'int'
    7 |   cin >> a >> s >> b
      |                     ^
      |                     ;
    8 | 
    9 |   int answer = 0;
      |   ~~~                
a.cc:11:4: error: 'answer' was not declared in this scope
   11 |    answer = a + b;
      |    ^~~~~~
a.cc:13:4: error: 'answer' was not declared in this scope
   13 |    answer =  a - b;
      |    ^~~~~~
a.cc:15:11: error: 'answer' was not declared in this scope
   15 |   cout << answer << endl;
      |           ^~~~~~
Language: C++

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

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

  int answer;
  if( s == '+') {
   answer = a + b;
  } else {
   answer =  a - b;
  }
  cout << answer << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: expected ';' before 'int'
    7 |   cin >> a >> s >> b
      |                     ^
      |                     ;
    8 | 
    9 |   int answer;
      |   ~~~                
a.cc:11:4: error: 'answer' was not declared in this scope
   11 |    answer = a + b;
      |    ^~~~~~
a.cc:13:4: error: 'answer' was not declared in this scope
   13 |    answer =  a - b;
      |    ^~~~~~
a.cc:15:11: error: 'answer' was not declared in this scope
   15 |   cout << answer << endl;
      |           ^~~~~~