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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'cin'
    8 |   cin >> a >> b;
      |   ^~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'cin'
    8 |   cin >> a >> op >> b;
      |   ^~~
Language: C++

#include <iostream>
#include <vector>
#include <set>
#include <math.h>
using namespace std;
int main() {
  __int64 n,a,k,p,m = 1000000007;
  bool haveZero = false;
  vector<long> arr;
  cin >> n;
  while (n--)
  {
    cin >> a;
    if (a == 0 && haveZero)
    {
      cout << 0;
      return 0;
    }
    if (a == 0) haveZero = true;
    arr.push_back(a);
  }
  k = set<double>(arr.begin(),arr.end()).size();
  if ( (arr.size() % 2 == 0 && k != arr.size() / 2) || (arr.size() % 2 == 1 && k != ceil(arr.size() / 2.0) ) )
  {
    cout << 0;
    return 0;
  }
  p = pow(2, floor(arr.size() / 2.0));
  cout << p % m;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: '__int64' was not declared in this scope; did you mean '__ynf64'?
    7 |   __int64 n,a,k,p,m = 1000000007;
      |   ^~~~~~~
      |   __ynf64
a.cc:10:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   10 |   cin >> n;
      |          ^
      |          yn
a.cc:13:12: error: 'a' was not declared in this scope
   13 |     cin >> a;
      |            ^
a.cc:22:3: error: 'k' was not declared in this scope
   22 |   k = set<double>(arr.begin(),arr.end()).size();
      |   ^
a.cc:28:3: error: 'p' was not declared in this scope
   28 |   p = pow(2, floor(arr.size() / 2.0));
      |   ^
a.cc:29:15: error: 'm' was not declared in this scope; did you mean 'tm'?
   29 |   cout << p % m;
      |               ^
      |               tm
Language: C++

＃include<iostream>
using namespace std;

int main(){
	int a,b;
  	char x;
  	cin>>a>>x>>b;
  	cout<<axb;
}

Compiler output:
a.cc:1:1: error: '\U0000ff03include' does not name a type
    1 | ＃include<iostream>
      | ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>a>>x>>b;
      |         ^~~
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout<<axb;
      |         ^~~~
a.cc:8:15: error: 'axb' was not declared in this scope
    8 |         cout<<axb;
      |               ^~~
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:
a.cc: In function 'int main()':
a.cc:6:11: error: expected primary-expression before '>>' token
    6 |   cin>>a>>>>op>>b;
      |           ^~
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:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if (op == "+") {
      |       ~~~^~~~~~
Language: C++

#include <iosream>
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;
  return 0;
}

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

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

int main()
{
long long int a,b,res;
  char c;
  cin>>a>>c>>b;

  if(c == '+'){
    res = a + b;
    cout<<res<<endl;
  }
  else{
    res = a-b;
    cout<<res<<endl;
  }

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

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

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

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

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

#include<cstdio>
using namespace std;
int ans,a,b;
char op,stp1,stp2;
int main(){
	scanf("%d",&a);
	scanf("%c",&stp1);
	scanf("%c",&op);
	scanf("%c",&stp2);
	scanf("%d",&b);
	if (op=='+'){
		ans=a+b;
	}else if (op=='-'){
		ans=a-b;
	}
	printf("%d",ans);
return 0;} 

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

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

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

#include<bits/stdc++.h>
using namespace std;
int i,j;char c;
int main(){
	scanf("%d %c %d",&i,&c,&j);
	if (c=='+') printf("%d\n",i+j);
	else printf("%d\n",i-j);
}

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

#include<iostream>
using namespace std;

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


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

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected initializer before '==' token
    8 |       if(char op=="+") ans = a+b;
      |                 ^~
a.cc:8:17: error: expected ')' before '==' token
    8 |       if(char op=="+") ans = a+b;
      |         ~       ^~
      |                 )
a.cc:9:23: error: expected initializer before '==' token
    9 |       else  if(char op=="-") ans = a-b;
      |                       ^~
a.cc:9:23: error: expected ')' before '==' token
    9 |       else  if(char op=="-") ans = a-b;
      |               ~       ^~
      |                       )
a.cc:10:18: error: expected ';' before ':' token
   10 |         cout<<ans:
      |                  ^
      |                  ;
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected unqualified-id before '==' token
    8 |       if(char=="+") ans = a+b;
      |              ^~
a.cc:9:20: error: expected unqualified-id before '==' token
    9 |       else  if(char=="-") ans = a-b;
      |                    ^~
a.cc:10:18: error: expected ';' before ':' token
   10 |         cout<<ans:
      |                  ^
      |                  ;
Language: C++

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

int main(){
      int a,b; int ans;
      char op;
      cin>>a>>op>>b;
      if(char=="+") ans = a+b;
       if(char=="-") ans = a-b;
       if(char=="*") ans = a*b;
        if(char=="/") ans = a/b;
        cout<<ans:
        return 0;
}
      


Compiler output:
a.cc:1:9: 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, C;
  string op;
  
  //入力部
  cin >> A >> op >> B;
  
  if(op=="+"){
    C=A+B;
  }
  else if(op=="-"){
    C=A-B;
  }
  else{
    cout <<"error"<< endl
  }
  cout << C << endl;
}


Compiler output:
a.cc:7:3: error: extended character 　 is not valid in an identifier
    7 |   int　A, B, C;
      |   ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'int\U00003000A' was not declared in this scope
    7 |   int　A, B, C;
      |   ^~~~~~
a.cc:7:11: error: 'B' was not declared in this scope
    7 |   int　A, B, C;
      |           ^
a.cc:7:14: error: 'C' was not declared in this scope
    7 |   int　A, B, C;
      |              ^
a.cc:11:10: error: 'A' was not declared in this scope
   11 |   cin >> A >> op >> B;
      |          ^
a.cc:20:26: error: expected ';' before '}' token
   20 |     cout <<"error"<< endl
      |                          ^
      |                          ;
   21 |   }
      |   ~
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 b=sc.next();
    int c=sc.nextInt();
    if(b.equals("+")) System.out.println(a+c);
    else System.out.println(a-b);
  }
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	int a,b,ans;
	string op;
	cin>>x>>op>>y;
	if(op=="+"){
		ans=a+b;
	}else{
		ans=a-b;
	}
	cout<<ans<<endl;
}

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

#include <bits/stdc++.h>

using namespace std;

int main() {
    long long a , b ;
    char c ; 
    scanf("%lld %c %lld", &a , &c , &b);
    if(c == '+'){
        cout << a + b << endl;
        return;
    }
    cout << (a - b) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   11 |         return;
      |         ^~~~~~
Language: C++

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

typedef pair<int,int> P;
#define ll long long
#define ld long double
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
#define sz(x) ((int)(x).size())
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)
#define all(x) (x).begin(),(x).end()

const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
int main()
{
    ll a.b;
    char op;
    cin >> a >> op >> b;
    if(op=='+')
    {
        cout << a+b << endl;
        return 0;
    }else
    {
        cout << a-b << endl;
        return 0;
    }

    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: expected initializer before '.' token
   19 |     ll a.b;
      |         ^
a.cc:21:12: error: 'a' was not declared in this scope
   21 |     cin >> a >> op >> b;
      |            ^
a.cc:21:23: error: 'b' was not declared in this scope
   21 |     cin >> a >> op >> b;
      |                       ^
Language: C++

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

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

    cout << A op B << endl;
}

    
    


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: expected ';' before 'op'
    8 |     cout << A op B << endl;
      |              ^~~
      |              ;
Language: C++

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

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

    cout << 'A' 'op' 'B' << endl;
}

    
    

Compiler output:
a.cc:8:17: warning: multi-character character constant [-Wmultichar]
    8 |     cout << 'A' 'op' 'B' << endl;
      |                 ^~~~
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before '\x6f70'
    8 |     cout << 'A' 'op' 'B' << endl;
      |                ^~~~~
      |                ;
Language: C

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

int main(void){
  int A, B;
  char op;
  scanf("%d %c %d", &A, &op, &B);
  if (op == '+'){
    printf("%d\n", A+B);
  } else if  (op == '-'){
    printf("%d\n", A-B);
  } else {
    printf("%s\n", "Invalid!")
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:31: error: expected ';' before '}' token
   13 |     printf("%s\n", "Invalid!")
      |                               ^
      |                               ;
   14 |   }
      |   ~
Language: C

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

int main(void){
  int A, B;
  char op;
  scanf("%d %c %d", &A, &op, &B);
  if (op == '+'){
    printf("%d\n", &A+&B);
  } else if  (op == '-'){
    printf("%d\n", &A-&B);
  } else {
    printf("%s\n", "Invalid!")
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:22: error: invalid operands to binary + (have 'int *' and 'int *')
    9 |     printf("%d\n", &A+&B);
      |                    ~~^~~
      |                    |  |
      |                    |  int *
      |                    int *
main.c:13:31: error: expected ';' before '}' token
   13 |     printf("%s\n", "Invalid!")
      |                               ^
      |                               ;
   14 |   }
      |   ~
Language: C

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

int main(void){
  int A, B;
  char op;
  scanf("%d %c %d", &A, &op, &B);
  if (op = '+'){
    printf("%d\n", A+B);
  } else if  (op = '-'){
    printf("%d\n", A-B);
  } else {
    printf("%s\n", "Invalid!")
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:31: error: expected ';' before '}' token
   13 |     printf("%s\n", "Invalid!")
      |                               ^
      |                               ;
   14 |   }
      |   ~
Language: C

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

int main(void){
  int A, B;
  char op;
  scanf("%d %c %d", &A, &op, &B);
  if (op = '+'){
    printf("%d\n", &A+&B);
  } else if  (op = '-'){
    printf("%d\n", &A-&B);
  } else {
    printf("%s\n", "Invalid!")
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:22: error: invalid operands to binary + (have 'int *' and 'int *')
    9 |     printf("%d\n", &A+&B);
      |                    ~~^~~
      |                    |  |
      |                    |  int *
      |                    int *
main.c:13:31: error: expected ';' before '}' token
   13 |     printf("%s\n", "Invalid!")
      |                               ^
      |                               ;
   14 |   }
      |   ~
Language: C

#include<stdio.h>
int main() {
	  int A,B;
	  char op;
	  scanf("%d%c%d",&A,&op,&B);
	  if(op=='+')
		printf("%d",a+b);
	  else if(op=='-')
		printf("%d",a-b);
	  else
		printf("Error");

	return 0;
}





Compiler output:
main.c: In function 'main':
main.c:7:29: error: 'a' undeclared (first use in this function)
    7 |                 printf("%d",a+b);
      |                             ^
main.c:7:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:31: error: 'b' undeclared (first use in this function)
    7 |                 printf("%d",a+b);
      |                               ^
Language: C++

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

int min()
{
  int a,b;
  char s;
  cin>>a>>s>>b;
  if(s=='+')
    cout<<a+b;
  else
    cout<<a-b;
}

Compiler output:
a.cc: In function 'int min()':
a.cc:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
   13 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: Java

import java.util*;

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.equals("+") ? a+b : a-b);
  }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util*;
                ^
1 error
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;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: 'c' was not declared in this scope
    9 |   if(c == '+'){
      |      ^
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,c;
  string b;
  cin >> a >> b >> c;
  if(b=="+")
  {
    cout << a+c << endl;
  }
  else{
    cout << a-c << endl;;
  }
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(iostream)
      |         ^
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string b;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #include(iostream)
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> a >> b >> c;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(iostream)
a.cc:6:15: error: 'b' was not declared in this scope
    6 |   cin >> a >> b >> c;
      |               ^
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout << a+c << endl;
      |     ^~~~
a.cc:9:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:20: error: 'endl' was not declared in this scope
    9 |     cout << a+c << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(iostream)
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << a-c << endl;;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:20: error: 'endl' was not declared in this scope
   12 |     cout << a-c << endl;;
      |                    ^~~~
a.cc:12:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(iostream)
      |         ^
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> a >> b >> c;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(iostream)
a.cc:7:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(b=="+")
      |      ~^~~~~
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout << a+c << endl;
      |     ^~~~
a.cc:9:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:20: error: 'endl' was not declared in this scope
    9 |     cout << a+c << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(iostream)
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << a-c << endl;;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:20: error: 'endl' was not declared in this scope
   12 |     cout << a-c << endl;;
      |                    ^~~~
a.cc:12:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(iostream)
      |         ^
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string b;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #include(iostream)
a.cc:6:6: error: 'b' was not declared in this scope
    6 |   if(b=="+")
      |      ^
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << a+c << endl;
      |     ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(iostream)
a.cc:8:20: error: 'endl' was not declared in this scope
    8 |     cout << a+c << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(iostream)
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << a-c << endl;;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:20: error: 'endl' was not declared in this scope
   11 |     cout << a-c << endl;;
      |                    ^~~~
a.cc:11:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include(iostream)
using namespace std;
int main(){
  int a,c;
  char b;
  if(b=="+")
  {
    cout << a+c << endl;
  }
  else{
    cout << a-c << endl;;
  }
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(iostream)
      |         ^
a.cc: In function 'int main()':
a.cc:6:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |   if(b=="+")
      |      ~^~~~~
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << a+c << endl;
      |     ^~~~
a.cc:1:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(iostream)
a.cc:8:20: error: 'endl' was not declared in this scope
    8 |     cout << a+c << endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(iostream)
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << a-c << endl;;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:20: error: 'endl' was not declared in this scope
   11 |     cout << a-c << endl;;
      |                    ^~~~
a.cc:11:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main(int argc, char const *argv[]) {
  int A, B, answer;
  char op;
  std::cin >> A >> B >> op;
  if (op='+') {
    answer == A + B;
  }
  else{
    answer == A - B;
  }
  std::cout << answer << '\n';
  return 0;
}

Compiler output:
a.cc:1:1: error: stray '##' in program
    1 | ##include <bits/stdc++.h>
      | ^~
a.cc:1:3: error: 'include' does not name a type
    1 | ##include <bits/stdc++.h>
      |   ^~~~~~~
a.cc: In function 'int main(int, const char**)':
a.cc:7:8: error: 'cin' is not a member of 'std'
    7 |   std::cin >> A >> B >> op;
      |        ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | ##include <bits/stdc++.h>
a.cc:14:8: error: 'cout' is not a member of 'std'
   14 |   std::cout << answer << '\n';
      |        ^~~~
a.cc:14:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

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

int main(int argc, char const *argv[]) {
  int A, B, answer;
  char op;
  std::cin >> A >> B >> op;
  if (op='+') {
    answer = A + B;
  }
  else{
    answer = A - B;
  }
  std::cout << answer << '\n';
  return 0;
}

Compiler output:
a.cc:1:1: error: stray '##' in program
    1 | ##include <bits/stdc++.h>
      | ^~
a.cc:1:3: error: 'include' does not name a type
    1 | ##include <bits/stdc++.h>
      |   ^~~~~~~
a.cc: In function 'int main(int, const char**)':
a.cc:7:8: error: 'cin' is not a member of 'std'
    7 |   std::cin >> A >> B >> op;
      |        ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | ##include <bits/stdc++.h>
a.cc:14:8: error: 'cout' is not a member of 'std'
   14 |   std::cout << answer << '\n';
      |        ^~~~
a.cc:14:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
	int a, b;
  char x;
    
  scanf("%d%d%c",&a,&b,&x);
  cout << a x b << endl;
  
return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: expected ';' before 'x'
   11 |   cout << a x b << endl;
      |            ^~
      |            ;
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
	int a, b;
  char x;
    cin >> a >> x >> b;
  cout << a x b << endl;
  
return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected ';' before 'x'
   10 |   cout << a x b << endl;
      |            ^~
      |            ;
Language: C++

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

int main() {
  int A,B;
  cin>>A>>B;
  char op;
  cin>>op;
  cout<<(A op B)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: expected ')' before 'op'
    9 |   cout<<(A op B)<<endl;
      |         ~ ^~~
      |           )
Language: C++

#include<bits\stdc++.h>
using namespace std;
int main()
{
   int a,c;
   char b;
   cin>>a>>b>>c;
   if(b=='+')
    cout<<a+c<<endl;
   else if(b=='-')
    cout<<a-c<<endl;
    return 0;

}


Compiler output:
a.cc:1:9: 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() {

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

      
      cout << a-c <<endl;
      
      
    }


  }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: conflicting declaration 'int a'
    7 |     int(a);
      |         ^
a.cc:5:7: note: previous declaration as 'char a'
    5 |  char a, b, c;
      |       ^
a.cc:8:9: error: conflicting declaration 'int c'
    8 |     int(c);
      |         ^
a.cc:5:13: note: previous declaration as 'char c'
    5 |  char a, b, c;
      |             ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'sout' was not declared in this scope; did you mean 'stdout'?
    8 | if(op=='+'){sout>>A+B>>endl;}
      |             ^~~~
      |             stdout
a.cc:9:8: error: 'sout' was not declared in this scope; did you mean 'stdout'?
    9 |   else{sout>>A-B>>endl;}
      |        ^~~~
      |        stdout
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'char'
    6 |   char op;
      |   ^~~~
a.cc:8:15: error: 'op' was not declared in this scope
    8 |   cin >> A >> op >> B;
      |               ^~
a.cc:8:21: error: 'B' was not declared in this scope
    8 |   cin >> A >> op >> B;
      |                     ^
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;
  } else if (op == '-'){
    cout << A - B;
  }

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

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

#define vi vector<int>
#define all(v) v.begin(),v.end()
#define ll long long int
#define  IOS    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
const ll MOD=1e9+7;

void solve(){
   int a,b;
   char c;
   cin >> a >> c >>  b;
   if(c=='+')cout << a+b;
   else cout << a-b;
}


int main(){
  IOS
     solve();
}
// integer overflow
// remember to clear visited array
// take input as vector<string> while using grid
3 

Compiler output:
a.cc:26:1: error: expected unqualified-id before numeric constant
   26 | 3
      | ^
Language: C++

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

#define vi vector<int>
#define all(v) v.begin(),v.end()
#define ll long long int
#define  IOS    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
const ll MOD=1e9+7;

void solve(){
   int a,b;
   cin >> a >> c >>  b;
   char c;
   if(c=='+')cout << a+b;
   else cout << a-b;
}


int main(){
  IOS
     solve();
}
// integer overflow
// remember to clear visited array
// take input as vector<string> while using grid


Compiler output:
a.cc: In function 'void solve()':
a.cc:12:16: error: 'c' was not declared in this scope
   12 |    cin >> a >> c >>  b;
      |                ^
Language: C++

#include<bits/stdc++.h>
using namespace std
typedef long long int ll;
int main(){
	ll a,b;
	char x;
  cin>>a>>x>>b;
  if(x == '+'){
  cout<<a+b<<"\n";
  }
  else{
  cout<<a-b<<"\n";
  }
  return 0;
}

Compiler output:
a.cc:2:20: error: expected ';' before 'typedef'
    2 | using namespace std
      |                    ^
      |                    ;
    3 | typedef long long int ll;
      | ~~~~~~~
Language: C++

#include<iostream>
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:7:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(op=="+")
      |      ~~^~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'cin'
    8 |   cin >> A >> x >> B;
      |   ^~~
a.cc:10:7: error: 'x' was not declared in this scope
   10 |   if( x == '+' ){
      |       ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> A >> op >> 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:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |     cout << A+B;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |     cout << A-B;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <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:10:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     if (op == "+"){
      |         ~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B;
  string S; 
  cin A >> S >> B;
  
  if(S == "+")
    cout << A + B << endl;
  else
    cout << A - B << endl;
  
  
  return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, B;
  String S; 
  cin A >> S >> B;
  
  if(S == "+")
    cout << A + B << endl;
  else
    cout << A - B << endl;
  
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'String' was not declared in this scope
    6 |   String S;
      |   ^~~~~~
a.cc:7:6: error: expected ';' before 'A'
    7 |   cin A >> S >> B;
      |      ^~
      |      ;
a.cc:9:6: error: 'S' was not declared in this scope
    9 |   if(S == "+")
      |      ^
Language: C++

#include <iostream>

using namespace std;

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

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

#include <iostream>

using namespace std;

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected primary-expression before '}' token
    8 |   {x=a+b+}
      |          ^
Language: C++

#include <iostream>
#include <cmath>

using namespace std;

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

    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:10: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"+"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |     if(op="+"){
      |        ~~^~~~
      |          |
      |          std::__cxx11::basic_string<char>
a.cc:16:17: error: expected ';' before '{' token
   16 |     else(op="-"){
      |                 ^
      |                 ;
Language: C++

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

int main(){
  ll a,b;
  string t;
  cin >> a >> t >> 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: 'op' was not declared in this scope
    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;
  } elseif ( op == '-' ){
               cout << A-B << endl;
  } else {
               cout << "error" << endl;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'elseif' was not declared in this scope
   11 |   } elseif ( op == '-' ){
      |     ^~~~~~
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;

  cin >> A >>op >> B;
  if       ( op == '+' ){
               cout << A+B << endl;
  } elseif ( op == '++' ){
               cout << A-B << endl;
  } else {
               cout << "error" << endl;
  }
}



Compiler output:
a.cc:11:20: warning: multi-character character constant [-Wmultichar]
   11 |   } elseif ( op == '++' ){
      |                    ^~~~
a.cc: In function 'int main()':
a.cc:11:5: error: 'elseif' was not declared in this scope
   11 |   } elseif ( op == '++' ){
      |     ^~~~~~
a.cc:13:5: error: 'else' without a previous 'if'
   13 |   } else {
      |     ^~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |    if( p == "+" ) 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;
  }
  if (op == -) {
    cout << a - b << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected primary-expression before ')' token
   10 |   if (op == +) {
      |              ^
a.cc:13:14: error: expected primary-expression before ')' token
   13 |   if (op == -) {
      |              ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'x' was not declared in this scope
    9 |     x = a + b;
      |     ^
a.cc:12:5: error: 'x' was not declared in this scope
   12 |     x = a - b;
      |     ^
a.cc:14:11: error: 'x' was not declared in this scope
   14 |   cout << x <<endl;
      |           ^
Language: C++

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

int main() {
  int a,c,d;
  string b;
  cin >> a >> b >> c;

  // ここにプログラムを追記
  if (b == +) {
    d = a + c;
  }
  else {
    d = a - c;
  }
  cout << d << endl;
}


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before 'C'
   10 |     cout << A C B << endl;
      |              ^~
      |              ;
a.cc:13:14: error: expected ';' before 'C'
   13 |     cout << A C 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 op B << endl;
  }
  else if(op == '-'){
    cout << A op B << endl;
  }
  
}

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

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

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

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

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

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


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
	char op;
	cin>>op;
	int a,b;
	cin>>a>>b;
	switch(op){
		case '+';
		cout<<a+b;
		break;
		case'-'
		cout<<a-b;
		break;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:25: error: expected ':' before ';' token
   10 |                 case '+';
      |                         ^
      |                         :
a.cc:13:24: error: expected ':' before 'cout'
   13 |                 case'-'
      |                        ^
      |                        :
   14 |                 cout<<a-b;
      |                 ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int A, C;
string op
std::cin >> A>> op>> C;
if (op=="+") {
  std::cout << A+C << '\n';/* code */
}
if (op=="-"){
std::cout << A-C << '\n';
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: expected initializer before 'std'
    6 | std::cin >> A>> op>> C;
      | ^~~
a.cc:7:5: error: 'op' was not declared in this scope
    7 | if (op=="+") {
      |     ^~
a.cc:10:5: error: 'op' was not declared in this scope
   10 | if (op=="-"){
      |     ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
int A, op, C;
std::cin >> A>> op>> C;
if (op=="+") {
  std::cout << A+C << '\n';/* code */
}
if (op=="-"){
std::cout << A-C << '\n';
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 | if (op=="+") {
      |     ~~^~~~~
a.cc:9:7: 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, op, C;
std::cin >> A>> op>> C;
if (op=="+") {
  std::cout << A+C << '\n';/* code */
}
if (op=="-")
std::cout << A-C << '\n';
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 | if (op=="+") {
      |     ~~^~~~~
a.cc:9:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 | if (op=="-")
      |     ~~^~~~~
a.cc: At global scope:
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
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 if(op=-'-'){
    cout << A-B << endl;
  }
}

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

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

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


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

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

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

Compiler output:
a.cc:1:10: fatal error: bits/sdc++.h: No such file or directory
    1 | #include <bits/sdc++.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 == '+') 
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: expected primary-expression before '}' token
   10 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long INFL = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;



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

    int A,B;
    char x;
    cin >>A>>x>>b;
    if(x=='+') cout << A+B << endl;
    else cout <<A-B<<endl;



}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: 'b' was not declared in this scope
   18 |     cin >>A>>x>>b;
      |                 ^
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:9:10: 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>
a.cc:13:18: error: expected ';' before '{' token
   13 |   else (op = "-"){
      |                  ^
      |                  ;