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

#include<iostream>
using namespace std;

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

  cin >> a >> op >> b;

  while(1){
    if(op == '+')        cout << a + b << endl; break;
    else if (op == '-')  cout << a - b << endl; break;
    else if (op == '*')  cout << a * b << endl; break;
    else if (op == '/')  cout << a / b << endl; break;
    else                 break;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'else' without a previous 'if'
   12 |     else if (op == '-')  cout << a - b << endl; break;
      |     ^~~~
a.cc:13:5: error: 'else' without a previous 'if'
   13 |     else if (op == '*')  cout << a * b << endl; break;
      |     ^~~~
a.cc:14:5: error: 'else' without a previous 'if'
   14 |     else if (op == '/')  cout << a / b << endl; break;
      |     ^~~~
a.cc:15:5: error: 'else' without a previous 'if'
   15 |     else                 break;
      |     ^~~~
Language: C++

#include <iostream>
#include <windows.h>
using namespace std;

int main(){

    int a,b;
	char op;
	
	while(1){
		cin >> a >> op >> b;
	if(op == '?')break;
		else if(op=='+'){
			cout << a+b << endl;
		}
		else if(op=='-'){
			cout << a-b << endl;
		}
		else if(op=='*'){
			cout << a*b << endl;
		}
		else if(op=='/'){
			cout << a/b << endl;
		}
	}
	Sleep(10000);
	return 0;
}

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

#include<iostream>
using namespace std;

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


for(i = 0; ; i++){
  
   cin >> a >> op >> b;

  if(op == "+")     cout << a + b << endl;
  elseif(op == "-") cout << a - b << endl;
  elseif(op == "*") cout << a * b << endl:
  elseif(op == "/") cout << a / b << endl;
  else break;

  i ++;
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'i' was not declared in this scope
    9 | for(i = 0; ; i++){
      |     ^
a.cc:13:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if(op == "+")     cout << a + b << endl;
      |      ~~~^~~~~~
a.cc:14:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   elseif(op == "-") cout << a - b << endl;
      |          ~~~^~~~~~
a.cc:14:3: error: 'elseif' was not declared in this scope
   14 |   elseif(op == "-") cout << a - b << endl;
      |   ^~~~~~
a.cc:15:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   elseif(op == "*") cout << a * b << endl:
      |          ~~~^~~~~~
a.cc:17:3: error: 'else' without a previous 'if'
   17 |   else break;
      |   ^~~~
Language: C++

#include<iostream>
using namespace std;

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


for(int i = 0; ; i++){
  
   cin >> a >> op >> b;

  if(op == "+")     cout << a + b << endl;
  else if(op == "-") cout << a - b << endl;
  else if(op == "*") cout << a * b << endl:
  else if(op == "/") cout << a / b << endl;
  else break;

  i ++;
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if(op == "+")     cout << a + b << endl;
      |      ~~~^~~~~~
a.cc:14:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   else if(op == "-") cout << a - b << endl;
      |           ~~~^~~~~~
a.cc:15:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   else if(op == "*") cout << a * b << endl:
      |           ~~~^~~~~~
a.cc:15:43: error: expected ';' before ':' token
   15 |   else if(op == "*") cout << a * b << endl:
      |                                           ^
      |                                           ;
Language: C++

#include<iostream>
using namespace std;

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


for(int i = 0; ; i++){
  
   cin >> a >> op >> b;

  if(op == '+')     cout << a + b << endl;
  else if(op == '-') cout << a - b << endl;
  else if(op == '*') cout << a * b << endl:
  else if(op == '/') cout << a / b << endl;
  else break;

  i ++;
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:43: error: expected ';' before ':' token
   15 |   else if(op == '*') cout << a * b << endl:
      |                                           ^
      |                                           ;
Language: C++

#include<iostream>
using namespace std;

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

for(int i = 0; ; i++){
  
   cin >> a >> op >> b;

  if(op == '+')      cout << a + b << endl;
  else if(op == '-') cout << a - b << endl;
  else if(op == '*') cout << a * b << endl:
  else if(op == '/') cout << a / b << endl;
  else break;

  i ++;
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:43: error: expected ';' before ':' token
   14 |   else if(op == '*') cout << a * b << endl:
      |                                           ^
      |                                           ;
Language: C++

#include<iostream>
using namespace std;

int main(){
int a, b,i;
char op;

for(i = 0; ; i++){
  
   cin >> a >> op >> b;

  if(op == '+')      cout << a + b << endl;
  else if(op == '-') cout << a - b << endl;
  else if(op == '*') cout << a * b << endl:
  else if(op == '/') cout << a / b << endl;
  else break;

  i ++;
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:43: error: expected ';' before ':' token
   14 |   else if(op == '*') cout << a * b << endl:
      |                                           ^
      |                                           ;
Language: C++

#include<iostream>
using namespace std;

int main(){
int a,b,c;
while(1){
cin>>a>>b>>c;
if(b == "?") break;
else if(b == "+") cout<<a+b<<endl;
else if(b == "-") cout<<a-b<<endl;
else if(b == "*") cout<<a*b<<endl;
else if(b == "/") cout<<a/b<<endl;
}}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 | if(b == "?") break;
      |    ~~^~~~~~
a.cc:9:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 | else if(b == "+") cout<<a+b<<endl;
      |         ~~^~~~~~
a.cc:10:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | else if(b == "-") cout<<a-b<<endl;
      |         ~~^~~~~~
a.cc:11:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 | else if(b == "*") cout<<a*b<<endl;
      |         ~~^~~~~~
a.cc:12:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 | else if(b == "/") cout<<a/b<<endl;
      |         ~~^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 | if(b == "?") break;
      |    ~~^~~~~~
a.cc:9:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 | else if(b == "+") cout<<a+c<<endl;
      |         ~~^~~~~~
a.cc:10:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | else if(b == "-") cout<<a-c<<endl;
      |         ~~^~~~~~
a.cc:11:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 | else if(b == "*") cout<<a*c<<endl;
      |         ~~^~~~~~
a.cc:12:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 | else if(b == "/") cout<<a/c<<endl;
      |         ~~^~~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 | if(b == "?") break;
      |    ~~^~~~~~
a.cc:9:15: error: expected primary-expression before ')' token
    9 | else if(b == +) cout<<a+c<<endl;
      |               ^
a.cc:10:15: error: expected primary-expression before ')' token
   10 | else if(b == -) cout<<a-c<<endl;
      |               ^
a.cc:11:15: error: expected primary-expression before ')' token
   11 | else if(b == *) cout<<a*c<<endl;
      |               ^
a.cc:12:14: error: expected primary-expression before '/' token
   12 | else if(b == /) cout<<a/c<<endl;
      |              ^
a.cc:12:15: error: expected primary-expression before ')' token
   12 | else if(b == /) cout<<a/c<<endl;
      |               ^
Language: C++

#include <stdio.h>
#include <math.h>


int main(void) {

	// 1_4-C Simple Calculator

	int a,b;
	char op;
	int ans;
	
	scanf("%d %c %d",&a,&op,&b);
	
	while(op != "?"){
		if(op=="+"){
			ans = a+b; 
		}else if(op=="-"){
			ans = a-b;
		}else if(op=="*"){
			ans = a*b;
		}else if(op=="/"){	
			ans = a/b;
		}
		printf("%d\n",ans);
		scanf("%d %c %d",&a,&op,&b);
	}
        return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |         while(op != "?"){
      |               ~~~^~~~~~
a.cc:16:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |                 if(op=="+"){
      |                    ~~^~~~~
a.cc:18:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                 }else if(op=="-"){
      |                          ~~^~~~~
a.cc:20:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |                 }else if(op=="*"){
      |                          ~~^~~~~
a.cc:22:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |                 }else if(op=="/"){
      |                          ~~^~~~~
Language: C++

#include<iostream>
#include<cstdio>

using namespace std;

int main()
{
	int a; int b; char op;
	while (true)
	{
		cin >> a >> op >> b;
		if (op == '+'){
			cout << a + b << endl;
		}
		if (op == '-'){
			cout << a - b << endl;
		}
		if (op == '*'){
			cout << a * b << endl;
		}
		if (op == '/'){
			cout << a / b << endl;
		}
		if (op == '?')
			break;
	}

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

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.Math;

public class Main {
    public static void main(String[] args) {
        try {
            BufferedReader stdReader = new BufferedReader(new InputStreamReader(System.in));
            
            String line;
            
            while((line = stdReader.readLine()) != null) {
                String[] input = line.split(" ", 0);
                int a = Integer.parseInt(input[0]);
                int b = Integer.parseInt(input[2]);
                String mark = input[1];
                
                // mark?????????´?????????
                if(mark.equals("?")) {
                    break;
                }
                
                // ?¶???????
                if(mark.equals("+")) {
                    System.out.println(a + b);
                    continue;
                }
                // ?????????
                if(mark.equals("-")) {
                    System.out.println(a - b);
                    continue;
                }
                // ?????????
                if(mark.equals("*")) {
                    System.out.println(a * b);
                    continue;
                }
                // ?????????
                if(mark.equals("/")) {
                    System.out.println(a / b);
                    continue;
                }
                
            }
            stdReader.close();
        } catch(Exception e) {
            e.getStackTrace();
            System.exit(-1);
        }
    }
}

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

#include <iostream>

#define MAX_SIZE (1000)

using namespace std;

int main()
{
    int  a, b;
    int  size;
    int* ans = new int[MAX_SIZE + 1];

    for (int i = 0; i < MAX_SIZE + 1; i++) {
        do {
            cin >> a >> op >> b;
        } while (((a < 0 || a > 20000) || (b < 0 || b > 20000)) || (op == '/' && b == 0));

        if (op == '+') {
            ans[i] = a + b;
        } else if (op == '-') {
            ans[i] = a - b;
        } else if (op == '*') {
            ans[i] = a * b;
        } else if (op == '/') {
            ans[i] = a / b;
        } else if (op == '?') {
            size = i;
            break;
        }       
    }
 
    for (int i = 0; i < size; i++) {
         cout << ans[i] << endl;
    }
     
    delete[] ans;

    return (0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: 'op' was not declared in this scope
   15 |             cin >> a >> op >> b;
      |                         ^~
a.cc:16:69: error: 'op' was not declared in this scope
   16 |         } while (((a < 0 || a > 20000) || (b < 0 || b > 20000)) || (op == '/' && b == 0));
      |                                                                     ^~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int a,b;
  char c;

  while(1){
    cin >> a >> c >> b;
    if(strcmp(c,"?")==0) break;
    if(strcmp(c,"+")==0) cout << a+b << endl;
    if(strcmp(c,"-")==0) cout << a-b << endl;
    if(strcmp(c,"*")==0) cout << a*b << endl;
    if(strcmp(c,"/")==0) cout << a/b << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'strcmp' was not declared in this scope
   10 |     if(strcmp(c,"?")==0) break;
      |        ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
a.cc:11:8: error: 'strcmp' was not declared in this scope
   11 |     if(strcmp(c,"+")==0) cout << a+b << endl;
      |        ^~~~~~
a.cc:11:8: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:12:8: error: 'strcmp' was not declared in this scope
   12 |     if(strcmp(c,"-")==0) cout << a-b << endl;
      |        ^~~~~~
a.cc:12:8: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:13:8: error: 'strcmp' was not declared in this scope
   13 |     if(strcmp(c,"*")==0) cout << a*b << endl;
      |        ^~~~~~
a.cc:13:8: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:14:8: error: 'strcmp' was not declared in this scope
   14 |     if(strcmp(c,"/")==0) cout << a/b << endl;
      |        ^~~~~~
a.cc:14:8: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;

int main(){
  int a,b;
  char c;

  while(1){
    cin >> a >> c >> b;
    if(strcmp(c,"?")==0) break;
    if(strcmp(c,"+")==0) cout << a+b << endl;
    if(strcmp(c,"-")==0) cout << a-b << endl;
    if(strcmp(c,"*")==0) cout << a*b << endl;
    if(strcmp(c,"/")==0) cout << a/b << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: 'strcmp' was not declared in this scope
   11 |     if(strcmp(c,"?")==0) break;
      |        ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<iostream>
  +++ |+#include <cstring>
    2 | #include<stdio.h>
a.cc:12:8: error: 'strcmp' was not declared in this scope
   12 |     if(strcmp(c,"+")==0) cout << a+b << endl;
      |        ^~~~~~
a.cc:12:8: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:13:8: error: 'strcmp' was not declared in this scope
   13 |     if(strcmp(c,"-")==0) cout << a-b << endl;
      |        ^~~~~~
a.cc:13:8: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:14:8: error: 'strcmp' was not declared in this scope
   14 |     if(strcmp(c,"*")==0) cout << a*b << endl;
      |        ^~~~~~
a.cc:14:8: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:15:8: error: 'strcmp' was not declared in this scope
   15 |     if(strcmp(c,"/")==0) cout << a/b << endl;
      |        ^~~~~~
a.cc:15:8: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

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

int main(){
  int a,b;
  char c;

  while(1){
    cin >> a >> c >> b;
    if(strcmp(c,"?")==0) break;
    if(strcmp(c,"+")==0) cout << a+b << endl;
    if(strcmp(c,"-")==0) cout << a-b << endl;
    if(strcmp(c,"*")==0) cout << a*b << endl;
    if(strcmp(c,"/")==0) cout << a/b << endl;
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   11 |     if(strcmp(c,"?")==0) break;
      |               ^
      |               |
      |               char
In file included from a.cc:2:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:12:15: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   12 |     if(strcmp(c,"+")==0) cout << a+b << endl;
      |               ^
      |               |
      |               char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:13:15: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   13 |     if(strcmp(c,"-")==0) cout << a-b << endl;
      |               ^
      |               |
      |               char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:14:15: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   14 |     if(strcmp(c,"*")==0) cout << a*b << endl;
      |               ^
      |               |
      |               char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:15:15: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   15 |     if(strcmp(c,"/")==0) cout << a/b << endl;
      |               ^
      |               |
      |               char
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
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 if(op == -){
		cout << a - b << endl;
	}
	else if(op == *){
		cout << a * b << endl;
	}
	else if(op == /){
		cout << a / b << endl;
	}
	else{
		break;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected primary-expression before ')' token
    9 |         if(op == +){
      |                   ^
a.cc:12:24: error: expected primary-expression before ')' token
   12 |         else if(op == -){
      |                        ^
a.cc:15:24: error: expected primary-expression before ')' token
   15 |         else if(op == *){
      |                        ^
a.cc:18:23: error: expected primary-expression before '/' token
   18 |         else if(op == /){
      |                       ^
a.cc:18:24: error: expected primary-expression before ')' token
   18 |         else if(op == /){
      |                        ^
a.cc:22:17: error: break statement not within loop or switch
   22 |                 break;
      |                 ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int a, b;
	string op;
	cin >> a >> op >> b;
	if(op == +){
		cout << a + b << endl;
	}
	else if(op == -){
		cout << a - b << endl;
	}
	else if(op == *){
		cout << a * b << endl;
	}
	else if(op == /){
		cout << a / b << endl;
	}
	else{
		break;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected primary-expression before ')' token
    9 |         if(op == +){
      |                   ^
a.cc:12:24: error: expected primary-expression before ')' token
   12 |         else if(op == -){
      |                        ^
a.cc:15:24: error: expected primary-expression before ')' token
   15 |         else if(op == *){
      |                        ^
a.cc:18:23: error: expected primary-expression before '/' token
   18 |         else if(op == /){
      |                       ^
a.cc:18:24: error: expected primary-expression before ')' token
   18 |         else if(op == /){
      |                        ^
a.cc:22:17: error: break statement not within loop or switch
   22 |                 break;
      |                 ^~~~~
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 if(op == -){
		cout << a - b << endl;
	}
	else if(op == *){
		cout << a * b << endl;
	}
	else if(op == /){
		cout << a / b << endl;
	}
	else if(op == ?){
		break;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected primary-expression before ')' token
    9 |         if(op == +){
      |                   ^
a.cc:12:24: error: expected primary-expression before ')' token
   12 |         else if(op == -){
      |                        ^
a.cc:15:24: error: expected primary-expression before ')' token
   15 |         else if(op == *){
      |                        ^
a.cc:18:23: error: expected primary-expression before '/' token
   18 |         else if(op == /){
      |                       ^
a.cc:18:24: error: expected primary-expression before ')' token
   18 |         else if(op == /){
      |                        ^
a.cc:21:23: error: expected primary-expression before '?' token
   21 |         else if(op == ?){
      |                       ^
a.cc:21:24: error: expected primary-expression before ')' token
   21 |         else if(op == ?){
      |                        ^
a.cc:21:24: error: expected ':' before ')' token
   21 |         else if(op == ?){
      |                        ^
      |                        :
a.cc:21:24: error: expected primary-expression before ')' token
a.cc:22:17: error: break statement not within loop or switch
   22 |                 break;
      |                 ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main(void){
    int a, b, ans;
	char op;
	while(1){
		cin >>a >>op >>b;
		if(op=='?'){
			break;
		}
		switch(op){
		case '+':
			ans=a+b;
			break;
		case '-':
			ans=a-b;
			break;
		case '*':
			ans=a*b;
			break;
		case '/':
			ans=a/b;
			break;
		}
		cout <<ans <<endl;
    return 0;
}

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

#include <stdio.h>
int main()
{
	int a, b, result;
	char op;
	scanf("%d%d%c",&a,&b,&op);

	
	if (op == '+')
		result = a + b;
	else if (op == '-')
		result = a - b;
	else if (op == '*')
		result = a*b;
	else if(op == '/')
		result = a / b;
	else break;

	printf("%d\n",result);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: break statement not within loop or switch
   17 |         else break;
      |              ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int a, b;
	int answer;
	char op;

	while (true){
		cin >> a >> op >> b;

		switch (op){
			case "+":
				answer = a + b;
				break;
			case "-":
				answer = a - b;
				break;
			case "*":
				answer = a * b;
				break;
			case "/":
				answer = a / b;
				break;
			case "?":
				return 0;
				break;
		}

		cout << answer << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:30: error: conversion from 'const char*' to 'int' in a converted constant expression
   13 |                         case "+":
      |                              ^~~
a.cc:13:30: error: could not convert '"+"' from 'const char [2]' to 'int'
   13 |                         case "+":
      |                              ^~~
      |                              |
      |                              const char [2]
a.cc:16:30: error: conversion from 'const char*' to 'int' in a converted constant expression
   16 |                         case "-":
      |                              ^~~
a.cc:16:30: error: could not convert '"-"' from 'const char [2]' to 'int'
   16 |                         case "-":
      |                              ^~~
      |                              |
      |                              const char [2]
a.cc:19:30: error: conversion from 'const char*' to 'int' in a converted constant expression
   19 |                         case "*":
      |                              ^~~
a.cc:19:30: error: could not convert '"*"' from 'const char [2]' to 'int'
   19 |                         case "*":
      |                              ^~~
      |                              |
      |                              const char [2]
a.cc:22:30: error: conversion from 'const char*' to 'int' in a converted constant expression
   22 |                         case "/":
      |                              ^~~
a.cc:22:30: error: could not convert '"/"' from 'const char [2]' to 'int'
   22 |                         case "/":
      |                              ^~~
      |                              |
      |                              const char [2]
a.cc:25:30: error: conversion from 'const char*' to 'int' in a converted constant expression
   25 |                         case "?":
      |                              ^~~
a.cc:25:30: error: could not convert '"?"' from 'const char [2]' to 'int'
   25 |                         case "?":
      |                              ^~~
      |                              |
      |                              const char [2]
Language: C++

#include <iostream>
using namespace std;

int main(){
	int a, b;
	int answer;
	char op;

	while (true){
		cin >> a >> op >> b;

		if (op == "+"){
			answer = a + b;
		}else if(op == "-"){
			answer = a - b;
		}else if(op == "*"){
			answer = a * b;
		}else if(op == "/"){
			answer = a / b;
		}else if(op == "?"){
			return 0;
		}

		cout << answer << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |                 if (op == "+"){
      |                     ~~~^~~~~~
a.cc:14:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                 }else if(op == "-"){
      |                          ~~~^~~~~~
a.cc:16:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |                 }else if(op == "*"){
      |                          ~~~^~~~~~
a.cc:18:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                 }else if(op == "/"){
      |                          ~~~^~~~~~
a.cc:20:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |                 }else if(op == "?"){
      |                          ~~~^~~~~~
Language: C++

int main()
{
	ios::sync_with_stdio(false);
	int a, c, ans = 0;
	char b;
	while (1)
	{
		cin >> a >> b >> c;
		if (b == '?') break;
		switch (b)
		{
		case('+'): ans = a + c; break;
		case('-'): ans = a - c; break;
		case('*'): ans = a * c; break;
		case('/'): ans = a / c; break;
		}
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'ios' has not been declared
    3 |         ios::sync_with_stdio(false);
      |         ^~~
a.cc:8:17: error: 'cin' was not declared in this scope
    8 |                 cin >> a >> b >> c;
      |                 ^~~
a.cc:17:17: error: 'cout' was not declared in this scope
   17 |                 cout << ans << endl;
      |                 ^~~~
a.cc:17:32: error: 'endl' was not declared in this scope
   17 |                 cout << ans << endl;
      |                                ^~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	char op;
	int a,b,c;
	cin>>a>>op>>b;
 if(op=='?')break;

 if(op=='+'){
	c=a+b;
	cout<<c<<endl;
}if(op=='-'){
	c=a-b;
	cout<<c<<endl;
}if(op=='*'){
	c=a*b;
	cout<<c<<endl;
}if(op=='/'){
	c=a/b;
    cout<<c<<endl;
   } return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: break statement not within loop or switch
    7 |  if(op=='?')break;
      |             ^~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(){
int a,b;
string op;
while(1){
cin>>a>>op>>b;
if(op==?) break;
else if(op==+) cout<<a+b<<endl;
else if(op==-) cout<<a-b<<endl;
else if(op==*) cout<<a*b<<endl;
else if(op==/) cout<<a/b<<endl;
else break;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: expected primary-expression before '?' token
   10 | if(op==?) break;
      |        ^
a.cc:10:9: error: expected primary-expression before ')' token
   10 | if(op==?) break;
      |         ^
a.cc:10:9: error: expected ':' before ')' token
   10 | if(op==?) break;
      |         ^
      |         :
a.cc:10:9: error: expected primary-expression before ')' token
a.cc:11:14: error: expected primary-expression before ')' token
   11 | else if(op==+) cout<<a+b<<endl;
      |              ^
a.cc:12:14: error: expected primary-expression before ')' token
   12 | else if(op==-) cout<<a-b<<endl;
      |              ^
a.cc:13:14: error: expected primary-expression before ')' token
   13 | else if(op==*) cout<<a*b<<endl;
      |              ^
a.cc:14:13: error: expected primary-expression before '/' token
   14 | else if(op==/) cout<<a/b<<endl;
      |             ^
a.cc:14:14: error: expected primary-expression before ')' token
   14 | else if(op==/) cout<<a/b<<endl;
      |              ^
Language: C++

#include<iostream>
using namespace std;

int main(){
int a,b;
char op;
while(1){
cin>>a>>op>>b;
if(op==?) break;
else if(op=='+') cout<<a+b<<endl;
else if(op=='-') cout<<a-b<<endl;
else if(op=='*') cout<<a*b<<endl;
else if(op=='/') cout<<a/b<<endl;
else break;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: expected primary-expression before '?' token
    9 | if(op==?) break;
      |        ^
a.cc:9:9: error: expected primary-expression before ')' token
    9 | if(op==?) break;
      |         ^
a.cc:9:9: error: expected ':' before ')' token
    9 | if(op==?) break;
      |         ^
      |         :
a.cc:9:9: error: expected primary-expression before ')' token
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a,b,s;
  char op;
  cin >> a >> op >> b;
  if (op == "+") s = a + b;
  if (op == "-") s = a - b;
  if (op == "*") s = a * b;
  if (op == "/") s = a / b;
  cout << s << endl;
  return 0;
}

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

#include <stdio.h>
#include <string.h>
int main(void){
    int a,b;
    int d[3000];
    char c[1];
    int n,j;
    n=1;
    j = 0;
    while(j == 0){
        scanf("%d %s %d",&a,&c,&b);
        if(strcmp(c,"?") == 0){
            j = 1;
        }else{
            if(strcmp(c,"+")==0){
                d[n] = a+b;
            }else if(strcmp(c,"-")==0){
                d[n] = a-b;
            }else if(strcmp(c,"*")==0){
                d[n] = a*b;
            }else if(strcmp(c,"/")==0){
                d[n] = a/b;
            }
            n++;
        }
    }

    for(int i=1;i<n;i++){
        printf("%d\n",d[i]);
    }
}
~                                                                                                                                                                                                           
~     

Compiler output:
a.cc:33:1: error: expected class-name before '~' token
   33 | ~
      | ^
Language: C++

#include<iostream>
using namespace std;

int main() {
 int a, b;
 char op;
 while(cin >> a >> op >> b, op != '?') {
 switch(op) {
   case '?':
    return 0;
   case '+':
    cout << a + b << endl;
    break;
   case '-':
    cout << a - b << endl;
    break;
   case '*':
    cout << a * b << endl;
    break;
   case '/';
    cout << a / b << endl;
    break;
 }
}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: expected ':' before ';' token
   20 |    case '/';
      |            ^
      |            :
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main()
{
	int a, b;
	string x;
	while (true) {
		cin >> a >> x >> b;
		if (x == "?")
		{
			break;
		}
		else if (x == "+") {
			cout << a + b << endl;
			break;
		}
		else if (x == "-") {
			cout << a - b << endl;
			break;
		}
		else if (x == "*") {
			cout << a*b << endl;
			break;
		}
		else if (x == "/") {
			cout << a / b << endl;
			break;
		}
	}
	return 0;

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

include<iostream>
using std::cout;
using std::cin;
using std::endl;

void calc (int a, char op, int b); 

int main(void) {
    int a;
    int b;
    char op;
    while (op != '?') {
        cin >> a >> op >> b;
        calc(a, op, b);
    }

    return 0;
}

void calc (int a, char op, int b) {
    if (op == '+') {
       cout << a + b << endl; 
    } else if (op == '-') {
       cout << a - b << endl; 
    } else if (op == '*') {
       cout << a * b << endl; 
    } else if (op == '/') {
       cout << a / b << endl; 
    } else {
    }
    return;    
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc:3:12: error: 'cin' has not been declared in 'std'
    3 | using std::cin;
      |            ^~~
a.cc:4:12: error: 'endl' has not been declared in 'std'
    4 | using std::endl;
      |            ^~~~
a.cc: In function 'int main()':
a.cc:13:9: error: 'cin' was not declared in this scope
   13 |         cin >> a >> op >> b;
      |         ^~~
a.cc: In function 'void calc(int, char, int)':
a.cc:22:8: error: 'cout' was not declared in this scope
   22 |        cout << a + b << endl;
      |        ^~~~
a.cc:22:25: error: 'endl' was not declared in this scope
   22 |        cout << a + b << endl;
      |                         ^~~~
a.cc:24:8: error: 'cout' was not declared in this scope
   24 |        cout << a - b << endl;
      |        ^~~~
a.cc:24:25: error: 'endl' was not declared in this scope
   24 |        cout << a - b << endl;
      |                         ^~~~
a.cc:26:8: error: 'cout' was not declared in this scope
   26 |        cout << a * b << endl;
      |        ^~~~
a.cc:26:25: error: 'endl' was not declared in this scope
   26 |        cout << a * b << endl;
      |                         ^~~~
a.cc:28:8: error: 'cout' was not declared in this scope
   28 |        cout << a / b << endl;
      |        ^~~~
a.cc:28:25: error: 'endl' was not declared in this scope
   28 |        cout << a / b << endl;
      |                         ^~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main() {
	int x = 0, y = 0, z = 0;
	char a[10];
	while (cin >> x >> a >> y;) {
		
		if (a[0] == '+') { 
			z = x + y;
		}else if (a[0] == '-') {
			z = x - y;
		}else if (a[0] == '*') {
			z = x * y;
		}else if (a[0] == '/') {
			z = x / y;
		}else if (a[0] == '?') {
			break;
		}
		cout << z << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:34: error: expected ')' before ';' token
    8 |         while (cin >> x >> a >> y;) {
      |               ~                  ^
      |                                  )
a.cc:8:35: error: expected primary-expression before ')' token
    8 |         while (cin >> x >> a >> y;) {
      |                                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
    int a,b;
    char op;
    while(true){
        cin >> a >> op >> b;
        fflush(stdin);
        if (op =='?') return 0;
        else if (op =='+') cout << a+b << endl;
        else if (op =='-') cout << a-b << endl;
        else if (op =='/') cout << a/b << endl;
        else if (op =='*') cout << a*b << endl;
    }

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:14:6: error: expected '}' at end of input
   14 |     }
      |      ^
a.cc:3:40: note: to match this '{'
    3 | int main(int argc, char const *argv[]) {
      |                                        ^
Language: C++

#include <iostream>
using namespace std;
int main(){
	int a, b, i;
	char op;
	do{
		cin >> a >> op >> b;
		switch(op){
			case "+": cout << a + b << endl;break;
			case "-": cout << a - b << endl;break;
			case "/": cout << a / b << endl;break;
			case "*": cout << a * b << endl;break;
			default : break;
		} 
	}while(op != "?");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: conversion from 'const char*' to 'int' in a converted constant expression
    9 |                         case "+": cout << a + b << endl;break;
      |                              ^~~
a.cc:9:30: error: could not convert '"+"' from 'const char [2]' to 'int'
    9 |                         case "+": cout << a + b << endl;break;
      |                              ^~~
      |                              |
      |                              const char [2]
a.cc:10:30: error: conversion from 'const char*' to 'int' in a converted constant expression
   10 |                         case "-": cout << a - b << endl;break;
      |                              ^~~
a.cc:10:30: error: could not convert '"-"' from 'const char [2]' to 'int'
   10 |                         case "-": cout << a - b << endl;break;
      |                              ^~~
      |                              |
      |                              const char [2]
a.cc:11:30: error: conversion from 'const char*' to 'int' in a converted constant expression
   11 |                         case "/": cout << a / b << endl;break;
      |                              ^~~
a.cc:11:30: error: could not convert '"/"' from 'const char [2]' to 'int'
   11 |                         case "/": cout << a / b << endl;break;
      |                              ^~~
      |                              |
      |                              const char [2]
a.cc:12:30: error: conversion from 'const char*' to 'int' in a converted constant expression
   12 |                         case "*": cout << a * b << endl;break;
      |                              ^~~
a.cc:12:30: error: could not convert '"*"' from 'const char [2]' to 'int'
   12 |                         case "*": cout << a * b << endl;break;
      |                              ^~~
      |                              |
      |                              const char [2]
a.cc:15:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |         }while(op != "?");
      |                ~~~^~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
int a,b,op;
while(true){
cin>>a>>b>>op;
if(op=="?"){
break;
}
if(op=="+"){
  cout <<a+b<<endl;
}else if(op=="-"){
  cout <<a-b<<endl;
}else if(op=="*"){
  cout <<a*b<<endl;
}else{
  cout <<a/b<<endl;
}
}
return 0;
]

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 | if(op=="?"){
      |    ~~^~~~~
a.cc:10:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 | if(op=="+"){
      |    ~~^~~~~
a.cc:12:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 | }else if(op=="-"){
      |          ~~^~~~~
a.cc:14:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 | }else if(op=="*"){
      |          ~~^~~~~
a.cc:21:1: error: expected primary-expression before ']' token
   21 | ]
      | ^
a.cc:21:2: error: expected '}' at end of input
   21 | ]
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
int a,b;
string op;
while(true){
cin>>a>>b>>op;
if(op=="?"){
break;
}
if(op=="+"){
  cout <<a+b<<endl;
}else if(op=="-"){
  cout <<a-b<<endl;
}else if(op=="*"){
  cout <<a*b<<endl;
}else{
  cout <<a/b<<endl;
}
}
return 0;
]

Compiler output:
a.cc: In function 'int main()':
a.cc:23:1: error: expected primary-expression before ']' token
   23 | ]
      | ^
a.cc:23:2: error: expected '}' at end of input
   23 | ]
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int a,b;
char op;
while(true){
cin>>a>>b>>op;
if(op=="?"){
break;
}
if(op=="+"){
  cout <<a+b<<endl;
}else if(op=="-"){
  cout <<a-b<<endl;
}else if(op=="*"){
  cout <<a*b<<endl;
}else{
  cout <<a/b<<endl;
}
}
return 0;
}

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

#include<iostream>
using namespace std;
int main(){
int a,b;
char op;
while(true){
cin>>a>>b>>op;
if(op=="?"){
break;
}
if(op=='+'){
  cout <<a+b<<endl;
}else if(op=='-'){
  cout <<a-b<<endl;
}else if(op=='*'){
  cout <<a*b<<endl;
}else{
  cout <<a/b<<endl;
}
}
return 0;
}

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

#include<iostream>
using namespace std;
int main(){
int a,b;
char op;
while(true){
cin>>a>>b>>op;
if(op=='+'){
  cout <<a+b<<endl;
}else if(op=='-'){
  cout <<a-b<<endl;
}else if(op=='*'){
  cout <<a*b<<endl;
}else if(op=='/'){
  cout <<a/b<<endl;
}else{
  break;
}
return 0;
}

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

#include <stdio.h>

int main(void){

int a;
char op;
int b;
int x;

while(1){

scanf("%d %s %d",&a &op &b);
if(op==?) break;

x=a op b;

printf("x\n");
}

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: invalid operands of types 'int*' and 'char' to binary 'operator&'
   12 | scanf("%d %s %d",&a &op &b);
      |                  ~~ ^~~
      |                  |   |
      |                  |   char
      |                  int*
a.cc:13:8: error: expected primary-expression before '?' token
   13 | if(op==?) break;
      |        ^
a.cc:13:9: error: expected primary-expression before ')' token
   13 | if(op==?) break;
      |         ^
a.cc:13:9: error: expected ':' before ')' token
   13 | if(op==?) break;
      |         ^
      |         :
a.cc:13:9: error: expected primary-expression before ')' token
a.cc:15:4: error: expected ';' before 'op'
   15 | x=a op b;
      |    ^~~
      |    ;
Language: C++

#include <stdio.h>

int main(void){

int a,b,x;
char op;

while(1){

scanf("%d %s %d",&a &op &b);
if(op=='?') break;

x=a op b;

printf("%d\n",x);
}

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: invalid operands of types 'int*' and 'char' to binary 'operator&'
   10 | scanf("%d %s %d",&a &op &b);
      |                  ~~ ^~~
      |                  |   |
      |                  |   char
      |                  int*
a.cc:13:4: error: expected ';' before 'op'
   13 | x=a op b;
      |    ^~~
      |    ;
Language: C++

#include <stdio.h>

int main(void){

int a,b,x;
char op;

while(1){

scanf("%d %s %d",&a,&op,&b);
if(op=='?') break;

x=a op b;

printf("%d\n",x);
}

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:4: error: expected ';' before 'op'
   13 | x=a op b;
      |    ^~~
      |    ;
Language: C++

#include <stdio.h>

int main(void){

int a,b,;
char op;

while(1){
scanf("%d %c %d",a,op,b);
if('?'==op) break;

which(op){
cace '+' :
        printf("%d",a+b);
        break;

cace '/' :
        printf("%d"a/b);
        break;

cace '-' :
        printf("%d"a-b);
        break;

cace '*' :
        printf("%d"a*b);
        break;
}
}

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: expected unqualified-id before ';' token
    5 | int a,b,;
      |         ^
a.cc:12:1: error: 'which' was not declared in this scope
   12 | which(op){
      | ^~~~~
Language: C++

#include <stdio.h>

int main(void){

int a,b;
char op;

while(1){
scanf("%d %c %d",a,op,b);
if('?'==op) break;

which(op){
cace '+' :
        printf("%d",a+b);
        break;

cace '/' :
        printf("%d"a/b);
        break;

cace '-' :
        printf("%d"a-b);
        break;

cace '*' :
        printf("%d"a*b);
        break;
}
}

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'which' was not declared in this scope
   12 | which(op){
      | ^~~~~
Language: C++

#include <stdio.h>

int main(void){

int a,b;
char op;

while(1){
scanf("%d %c %d",a,op,b);
if('?'==op) break;

which(op){
cace '+' :
        printf("%d\n",a+b);
        break;

cace '/' :
        printf("%d\n"a/b);
        break;

cace '-' :
        printf("%d\n"a-b);
        break;

cace '*' :
        printf("%d\n"a*b);
        break;
}
}

return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'which' was not declared in this scope
   12 | which(op){
      | ^~~~~