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

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a, b, x;
    string op;
    while(1){
        cin >> a >> op >> b;
        if(strcmp(op, '+') == 0){
            x = a + b;
        }
        if(strcmp(op, '-') == 0){
            x = a - b;
        }
        if(strcmp(op, '*') == 0){
            x = a * b;
        }
        if(strcmp(op, '/') == 0){
            x = a / b;
        }
        if(strcmp(op, '?') == 0){
            return 0;
        }
        cout << x << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
    8 |         if(strcmp(op, '+') == 0){
      |                   ^~
      |                   |
      |                   std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/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:11:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   11 |         if(strcmp(op, '-') == 0){
      |                   ^~
      |                   |
      |                   std::string {aka std::__cxx11::basic_string<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:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   14 |         if(strcmp(op, '*') == 0){
      |                   ^~
      |                   |
      |                   std::string {aka std::__cxx11::basic_string<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:17:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   17 |         if(strcmp(op, '/') == 0){
      |                   ^~
      |                   |
      |                   std::string {aka std::__cxx11::basic_string<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:20:19: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   20 |         if(strcmp(op, '?') == 0){
      |                   ^~
      |                   |
      |                   std::string {aka std::__cxx11::basic_string<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++


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stdio.h>
 
using namespace std;
 
int main(){
    int a,b;
    char op;
    while(true){
        scanf("%d %c %d",&a,&op,&b);
        if(op == '?') break;
        switch(op){
        case '+':
            printf("%d\n",a+b);
            break;
        case '-':
            printf("%d\n",a-b);
            break;
        case '/':
            printf("%d\n",a/b);
            break;
        case '*':
            printf("%d\n",a*b);
            break;
        }
    }
}


Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 1
      | ^
a.cc: In function 'int main()':
a.cc:36:9: error: 'scanf' was not declared in this scope
   36 |         scanf("%d %c %d",&a,&op,&b);
      |         ^~~~~
a.cc:40:13: error: 'printf' was not declared in this scope
   40 |             printf("%d\n",a+b);
      |             ^~~~~~
a.cc:29:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
   28 | #include <stdio.h>
  +++ |+#include <cstdio>
   29 |
Language: C++

int main() {
	int a, b;
	char op;
	while (1) {
		scanf("%d %c %d",&a, &op,1 ,&b);
		
		if (op == '?') {
			break;
		}
		if (op == '+' ) {
			printf("%d\n", a + b);
		}
		if (op == '-') {
			printf("%d\n", a - b);
		}
		if (op == '*') {
			printf("%d\n", a * b);
		}
		if (op == '/') {
			printf("%d\n", a / b);
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'scanf' was not declared in this scope
    5 |                 scanf("%d %c %d",&a, &op,1 ,&b);
      |                 ^~~~~
a.cc:11:25: error: 'printf' was not declared in this scope
   11 |                         printf("%d\n", a + b);
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
a.cc:14:25: error: 'printf' was not declared in this scope
   14 |                         printf("%d\n", a - b);
      |                         ^~~~~~
a.cc:14:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:17:25: error: 'printf' was not declared in this scope
   17 |                         printf("%d\n", a * b);
      |                         ^~~~~~
a.cc:17:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:25: error: 'printf' was not declared in this scope
   20 |                         printf("%d\n", a / b);
      |                         ^~~~~~
a.cc:20:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

int main() {
	int a, b;
	char op;
	while (1) {
		scanf("%d %c %d",&a, &op ,&b);
		
		if (op == '?') {
			break;
		}
		if (op == '+' ) {
			printf("%d\n", a + b);
		}
		if (op == '-') {
			printf("%d\n", a - b);
		}
		if (op == '*') {
			printf("%d\n", a * b);
		}
		if (op == '/') {
			printf("%d\n", a / b);
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'scanf' was not declared in this scope
    5 |                 scanf("%d %c %d",&a, &op ,&b);
      |                 ^~~~~
a.cc:11:25: error: 'printf' was not declared in this scope
   11 |                         printf("%d\n", a + b);
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
a.cc:14:25: error: 'printf' was not declared in this scope
   14 |                         printf("%d\n", a - b);
      |                         ^~~~~~
a.cc:14:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:17:25: error: 'printf' was not declared in this scope
   17 |                         printf("%d\n", a * b);
      |                         ^~~~~~
a.cc:17:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:25: error: 'printf' was not declared in this scope
   20 |                         printf("%d\n", a / b);
      |                         ^~~~~~
a.cc:20:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++


int main() {
	int a, b;
	char op;
	while (1) {
		scanf("%d %c %d",&a, &op ,&b);
		
		if (op == '?') {
			break;
		}
		if (op == '+' ) {
			printf("%d\n", a + b);
			break;
		}
		if (op == '-') {
			printf("%d\n", a - b);
			break;
		}
		if (op == '*') {
			printf("%d\n", a * b);
			break;
		}
		if (op == '/') {
			printf("%d\n", a / b);
			break;
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'scanf' was not declared in this scope
    6 |                 scanf("%d %c %d",&a, &op ,&b);
      |                 ^~~~~
a.cc:12:25: error: 'printf' was not declared in this scope
   12 |                         printf("%d\n", a + b);
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | 
a.cc:16:25: error: 'printf' was not declared in this scope
   16 |                         printf("%d\n", a - b);
      |                         ^~~~~~
a.cc:16:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:25: error: 'printf' was not declared in this scope
   20 |                         printf("%d\n", a * b);
      |                         ^~~~~~
a.cc:20:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:24:25: error: 'printf' was not declared in this scope
   24 |                         printf("%d\n", a / b);
      |                         ^~~~~~
a.cc:24:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++


int main() {
	int a, b;
	char op;
	while (1) {
		scanf("%d %c %d",&a, &op,1 ,&b);
		
		if (op == '?') {
			break;
		}
		if (op == '+' ) {
			printf("%d\n", a + b);
			break;
		}
		if (op == '-') {
			printf("%d\n", a - b);
			break;
		}
		if (op == '*') {
			printf("%d\n", a * b);
			break;
		}
		if (op == '/') {
			printf("%d\n", a / b);
			break;
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'scanf' was not declared in this scope
    6 |                 scanf("%d %c %d",&a, &op,1 ,&b);
      |                 ^~~~~
a.cc:12:25: error: 'printf' was not declared in this scope
   12 |                         printf("%d\n", a + b);
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | 
a.cc:16:25: error: 'printf' was not declared in this scope
   16 |                         printf("%d\n", a - b);
      |                         ^~~~~~
a.cc:16:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:25: error: 'printf' was not declared in this scope
   20 |                         printf("%d\n", a * b);
      |                         ^~~~~~
a.cc:20:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:24:25: error: 'printf' was not declared in this scope
   24 |                         printf("%d\n", a / b);
      |                         ^~~~~~
a.cc:24:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostream>
 using namespace std;

int main(){


int a[10000] , b[10000] ;
char op[10000] ;
int x[10000]; 



 	for (int i=1; i<=10000; i=i+1 )
 	{
 	cin >> a[i] >> op[i] >> b[i] ;

		if( op[i] == '?' )
 		{
 		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 // 異常終了
                }


 	}

 return 0;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |                 if ( op == '+' ){
      |                      ~~~^~~~~~
a.cc:23:26: error: invalid operands of types 'int [10000]' and 'int [10000]' to binary 'operator+'
   23 |                 cout<< a + b << endl;// 和
      |                        ~ ^ ~
      |                        |   |
      |                        |   int [10000]
      |                        int [10000]
a.cc:24:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |                 } else if ( op == '-' ){
      |                             ~~~^~~~~~
a.cc:26:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |                 } else if ( op == '*' ){
      |                             ~~~^~~~~~
a.cc:27:26: error: invalid operands of types 'int [10000]' and 'int [10000]' to binary 'operator*'
   27 |                 cout<< a * b << endl;// 積
      |                        ~ ^ ~
      |                        |   |
      |                        |   int [10000]
      |                        int [10000]
a.cc:28:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |                 } else if ( op == '/' ){
      |                             ~~~^~~~~~
a.cc:29:26: error: invalid operands of types 'int [10000]' and 'int [10000]' to binary 'operator/'
   29 |                 cout<< a / b << endl;// 商
      |                        ~ ^ ~
      |                        |   |
      |                        |   int [10000]
      |                        int [10000]
a.cc:31:22: error: expected ';' before '}' token
   31 |                 break // 異常終了
      |                      ^
      |                      ;
   32 |                 }
      |                 ~     
a.cc:38:3: error: expected '}' at end of input
   38 |  }
      |   ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
 using namespace std;

int main(){

 int a[10000] , b[10000] ;
 string op[10000] ;
 int x[10000]; 



 	for (int i=1; i<=10000; i=i+1 )
 	{
 	cin >> a[i] >> op[i] >> b[i] ;

         if ( op == '+' ){
         cout<< a[i] + b[i] << endl;// 和
         } else if ( op == '-' ){
         cout<< a[i] - b[i] << endl;// 差
         } else if ( op == '*' ){
         cout<< a[i] * b[i] << endl;// 積
         } else if ( op == '/' ){
         cout<< a[i] / b[i] << endl;// 商
         } else {
         break // 終了
         }


 	}

 return 0;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |          if ( op == '+' ){
      |               ~~~^~~~~~
a.cc:18:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |          } else if ( op == '-' ){
      |                      ~~~^~~~~~
a.cc:20:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |          } else if ( op == '*' ){
      |                      ~~~^~~~~~
a.cc:22:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |          } else if ( op == '/' ){
      |                      ~~~^~~~~~
a.cc:25:15: error: expected ';' before '}' token
   25 |          break // 終了
      |               ^
      |               ;
   26 |          }
      |          ~
Language: C++

#include<iostream>
 using namespace std;

int main(){

 int a[10000] , b[10000] ;
 char op[10000] ;
 int x[10000]; 



 	for (int i=1; i<=10000; i=i+1 )
 	{
 	cin >> a[i] >> op[i] >> b[i] ;

         if ( op == '+' ){
         cout<< a[i] + b[i] << endl;// 和
         } else if ( op == '-' ){
         cout<< a[i] - b[i] << endl;// 差
         } else if ( op == '*' ){
         cout<< a[i] * b[i] << endl;// 積
         } else if ( op == '/' ){
         cout<< a[i] / b[i] << endl;// 商
         } else {
         break // 終了
         }


 	}

 return 0;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |          if ( op == '+' ){
      |               ~~~^~~~~~
a.cc:18:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |          } else if ( op == '-' ){
      |                      ~~~^~~~~~
a.cc:20:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |          } else if ( op == '*' ){
      |                      ~~~^~~~~~
a.cc:22:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |          } else if ( op == '/' ){
      |                      ~~~^~~~~~
a.cc:25:15: error: expected ';' before '}' token
   25 |          break // 終了
      |               ^
      |               ;
   26 |          }
      |          ~
Language: C++

#include<iostream>
 using namespace std;

int main(){

 int a, b ;
 char op ;
 int x[10000]; 



 	for (int i=1; i<=10000; i=i+1 )
 	{
 	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:25:15: error: expected ';' before '}' token
   25 |          break // 終了
      |               ^
      |               ;
   26 |          }
      |          ~
Language: C++

#include<iostream>
 using namespace std;

int main(){


int a[10000] , b[10000] ;
char op[10000] ;
int x[10000]; 



 	for (int i=1; i<=10000; i=i+1 )
 	{
 	cin >> a[i] >> op[i] >> b[i] ;

		if( op[i] == '?' )
 		{
 		break;
 		}else{

                if ( op == '+' ){
                cout<< a[i] + b[i] << endl;// 和
                } else if ( op == '-' ){
                cout<< a[i] - b[i] << endl;// 差
                } else if ( op == '*' ){
                cout<< a[i] * b[i] << endl;// 積
                } else if ( op == '/' ){
                cout<< a[i] / b[i] << endl;// 商
                } else {
                break ; // 異常終了
                }


 	}

 return 0;
 }





Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |                 if ( op == '+' ){
      |                      ~~~^~~~~~
a.cc:24:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |                 } else if ( op == '-' ){
      |                             ~~~^~~~~~
a.cc:26:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |                 } else if ( op == '*' ){
      |                             ~~~^~~~~~
a.cc:28:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |                 } else if ( op == '/' ){
      |                             ~~~^~~~~~
a.cc:38:3: error: expected '}' at end of input
   38 |  }
      |   ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
 using namespace std;

int main(){


int a[10000] , b[10000] ;
char op[10000] ;
int x[10000]; 



 	for (int i=1; i<=10000; i=i+1 )
 	{
 	cin >> a[i] >> op[i] >> b[i] ;

		if( op[i] == '?' )
 		{
 		break;
 		}else{

                if ( op == '+' ){
                cout<< a[i] + b[i] << endl;// 和
                } else if ( op == '-' ){
                cout<< a[i] - b[i] << endl;// 差
                } else if ( op == '*' ){
                cout<< a[i] * b[i] << endl;// 積
                } else if ( op == '/' ){
                cout<< a[i] / b[i] << endl;// 商
                } else {
                break ; // 異常終了
                }


 	}

 return 0;
 }



Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |                 if ( op == '+' ){
      |                      ~~~^~~~~~
a.cc:24:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |                 } else if ( op == '-' ){
      |                             ~~~^~~~~~
a.cc:26:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |                 } else if ( op == '*' ){
      |                             ~~~^~~~~~
a.cc:28:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |                 } else if ( op == '/' ){
      |                             ~~~^~~~~~
a.cc:38:3: error: expected '}' at end of input
   38 |  }
      |   ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
 using namespace std;

int main(){


int a[10000] , b[10000] ;
char op[10000] ;
int x[10000]; 



 	for (int i=0; i<=10000; i=i+1 )
 	{
 	cin >> a[i] >> op[i] >> b[i] ;

		if( op[i] == '?' )
 		{
 		break;
 		}else{

                if ( op == '+' ){
                cout<< a[i] + b[i] << endl;// 和
                } else if ( op == '-' ){
                cout<< a[i] - b[i] << endl;// 差
                } else if ( op == '*' ){
                cout<< a[i] * b[i] << endl;// 積
                } else if ( op == '/' ){
                cout<< a[i] / b[i] << endl;// 商
                } else {
                break ; // 異常終了
                }


 	}

 return 0;
 }



Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |                 if ( op == '+' ){
      |                      ~~~^~~~~~
a.cc:24:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |                 } else if ( op == '-' ){
      |                             ~~~^~~~~~
a.cc:26:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |                 } else if ( op == '*' ){
      |                             ~~~^~~~~~
a.cc:28:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |                 } else if ( op == '/' ){
      |                             ~~~^~~~~~
a.cc:38:3: error: expected '}' at end of input
   38 |  }
      |   ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
 using namespace std;

int main(){


int a[10000] , b[10000] ;
char op[10000] ;
int x[10000]; 



 	for (int i=1; i<=10000; i=i+1 )
 	{
 	cin >> a[i] >> op[i] >> b[i] ;

		if( op[i] == '?' )
 		{
 		break;
 		}else{
                // プログラムを続行する。
                }

                if ( op == '+' ){
                cout<< a[i] + b[i] << endl;// 和
                } else if ( op == '-' ){
                cout<< a[i] - b[i] << endl;// 差
                } else if ( op == '*' ){
                cout<< a[i] * b[i] << endl;// 積
                } else if ( op == '/' ){
                cout<< a[i] / b[i] << endl;// 商
                } else {
                break ; // 異常終了
                }


 	}

 return 0;
 }





Compiler output:
a.cc: In function 'int main()':
a.cc:24:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |                 if ( op == '+' ){
      |                      ~~~^~~~~~
a.cc:26:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |                 } else if ( op == '-' ){
      |                             ~~~^~~~~~
a.cc:28:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |                 } else if ( op == '*' ){
      |                             ~~~^~~~~~
a.cc:30:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   30 |                 } else if ( op == '/' ){
      |                             ~~~^~~~~~
Language: C++

#include<iostream>
 using namespace std;

int main(){


int a[10000] , b[10000] ;
char op[10000] ;
int x[10000]; 



 	for (int i=0; i<=10000; i=i+1 )
 	{
 	cin >> a[i] >> op[i] >> b[i] ;

		if( op[i] == '?' )
 		{
 		break;
 		}else{
                // プログラムを続行する。
                }

                if ( op == '+' ){
                cout<< a[i] + b[i] << endl;// 和
                } else if ( op == '-' ){
                cout<< a[i] - b[i] << endl;// 差
                } else if ( op == '*' ){
                cout<< a[i] * b[i] << endl;// 積
                } else if ( op == '/' ){
                cout<< a[i] / b[i] << endl;// 商
                } else {
                break ; // 異常終了
                }


 	}

 return 0;
 }





Compiler output:
a.cc: In function 'int main()':
a.cc:24:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |                 if ( op == '+' ){
      |                      ~~~^~~~~~
a.cc:26:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |                 } else if ( op == '-' ){
      |                             ~~~^~~~~~
a.cc:28:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |                 } else if ( op == '*' ){
      |                             ~~~^~~~~~
a.cc:30:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   30 |                 } else if ( op == '/' ){
      |                             ~~~^~~~~~
Language: C++

#include<iostream>
 using namespace std;

int main(){


int a[10000] , b[10000] ;
char op[10000] ;
int x[10000]; 



 	for (int i=1; i<=10000; i=i+1 )
 	{
 	 cin >> a[i] >> op[i] >> b[i] ;

		if( op[i] == '?' )
 		{
 		break;
 		}else{
         }

                if ( op == '+' ){
                cout<< a[i] + b[i] << endl; // �a
                } else if ( op == '-' ){
                cout<< a[i] - b[i] << endl; // ��
                } else if ( op == '*' ){
                cout<< a[i] * b[i] << endl; // ��
                } else if ( op == '/' ){
                cout<< a[i] / b[i] << endl; // ��
                } else {
                break ; // �ُ�I��
                }


 	}

 return 0;
 }





Compiler output:
a.cc: In function 'int main()':
a.cc:23:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |                 if ( op == '+' ){
      |                      ~~~^~~~~~
a.cc:25:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |                 } else if ( op == '-' ){
      |                             ~~~^~~~~~
a.cc:27:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |                 } else if ( op == '*' ){
      |                             ~~~^~~~~~
a.cc:29:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   29 |                 } else if ( op == '/' ){
      |                             ~~~^~~~~~
Language: C++

#include<iostream>
 using namespace std;

int main(){


int a[10000] , b[10000] ;
char op[10000] ;
int x[10000]; 



 	for (int i=1; i<=10000; i=i+1 )
 	{
 	 cin >> a[i] >> op[i] >> b[i] ;

		if( op[i] == '?' )
 		{
 		break;
 		}else{
         }

                if ( op == '+' ){
                cout<< a[i] + b[i] << endl; // �a
                } else if ( op[i] == '-' ){
                cout<< a[i] - b[i] << endl; // ��
                } else if ( op[i] == '*' ){
                cout<< a[i] * b[i] << endl; // ��
                } else if ( op[i] == '/' ){
                cout<< a[i] / b[i] << endl; // ��
                } else {
                break ; // �ُ�I��
                }


 	}

 return 0;
 }





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

#include<iostream>
using namespace std;

int Caluculater(int a, int b, char op);

int main(){
    int a,b;
    int result[],i=0,j=0;
    char op;
    
    while(1){
    cin >> a >> op >> b;
    if(op == '?') break;
    result[i] = Caluculater(a,b,op);
    i++;
    j++;
    }
    for(i = 0; i < j; i++){
        cout << result[i];
    }
    return 0;
}

int Caluculater(int a, int b, char op){
    if(op == '+') return a + b;
    else if(op == '-') return a - b;
    else if(op == '*') return a * b;
    else if(op == '/') return a / b;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: storage size of 'result' isn't known
    8 |     int result[],i=0,j=0;
      |         ^~~~~~
a.cc: In function 'int Caluculater(int, int, char)':
a.cc:29:1: warning: control reaches end of non-void function [-Wreturn-type]
   29 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

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

	while (1) {
		cin >> a >> b >> op;
		if (op == '?') break;
		cout << a op b << endl;
	}
	return 0;
}


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

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

int main()
{
    char eq[20] = {'\0'};
    
    scanf("%s",eq);
    
    int a = 0;
    char op;
    int b;
    
    while(1){
    int now = 0;
    int exit = 0;
    
    for(int i = 0;;i++)
    {
        char read[10] = {'\0'};
        
        for(int k = 0; ; k++)
        {
            if(eq[now + k] == ' '||eq[now+k] == '\0')
            {
                if(eq[now+k] == '\0') exit = 1;
                now +=(k+1);
            }
            read[k] = eq[now + k];
        }
        if(i == 0)
        {
            a = atoi(read);
        }else if(i == 1)
        {
            op = read[0];
        }else if(i == 2)
        {
            b = atoi(read);
        }
        if(exit = 1)break;
         i++
    }
    
    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;
        case '?': return ;
    }
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:13: error: expected ';' before '}' token
   42 |          i++
      |             ^
      |             ;
   43 |     }
      |     ~        
a.cc:47:19: error: 'cout' was not declared in this scope
   47 |         case '+': cout << a+b << endl;
      |                   ^~~~
a.cc:47:34: error: 'endl' was not declared in this scope
   47 |         case '+': cout << a+b << endl;
      |                                  ^~~~
a.cc:55:19: error: return-statement with no value, in function returning 'int' [-fpermissive]
   55 |         case '?': return ;
      |                   ^~~~~~
Language: C++

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

using namespace std;

int main()
{
    char eq[20] = {'\0'};
    
    scanf("%s",eq);
    
    int a = 0;
    char op;
    int b;
    
    while(1){
    int now = 0;
    int exit = 0;
    
    for(int i = 0;;i++)
    {
        char read[10] = {'\0'};
        
        for(int k = 0; ; k++)
        {
            if(eq[now + k] == ' '||eq[now+k] == '\0')
            {
                if(eq[now+k] == '\0') exit = 1;
                now +=(k+1);
            }
            read[k] = eq[now + k];
        }
        if(i == 0)
        {
            a = atoi(read);
        }else if(i == 1)
        {
            op = read[0];
        }else if(i == 2)
        {
            b = atoi(read);
        }
        if(exit = 1)break;
         i++
    }
    
    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;
        case '?': return ;
    }
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:13: error: expected ';' before '}' token
   45 |          i++
      |             ^
      |             ;
   46 |     }
      |     ~        
a.cc:58:19: error: return-statement with no value, in function returning 'int' [-fpermissive]
   58 |         case '?': return ;
      |                   ^~~~~~
Language: C++

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

using namespace std;

int main()
{
    char eq[20] = {'\0'};
    
    scanf("%s",eq);
    
    int a = 0;
    char op;
    int b;
    
    while(1){
    int now = 0;
    int exit = 0;
    
    for(int i = 0;;i++)
    {
        char read[10] = {'\0'};
        
        for(int k = 0; ; k++)
        {
            if(eq[now + k] == ' '||eq[now+k] == '\0')
            {
                if(eq[now+k] == '\0') exit = 1;
                now +=(k+1);
            }
            read[k] = eq[now + k];
        }
        if(i == 0)
        {
            a = atoi(read);
        }else if(i == 1)
        {
            op = read[0];
        }else if(i == 2)
        {
            b = atoi(read);
        }
        if(exit = 1)break;
         i++
    }
    
    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;
        case '?': return 0;
    }
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:13: error: expected ';' before '}' token
   45 |          i++
      |             ^
      |             ;
   46 |     }
      |     ~
Language: C++

#include<iostream>
using namespace std; //or std::cin et al.

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


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

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

int main()
{
    int a;
    char op;
    int b;
    
    for(int i = 0; ; i++)
    {
        scanf("%d",&a);
        scanf("%c",&op);
        scanf("%d",&b);
    
    if(op == "+")
    {
        printf("%d\n",a+b);
    }else if(op == "-")
    {
        printf("%d\n", a-b);
    }else if(op == "*")
    {
        printf("%d\n",a*b);
    }else if(op == "/")
    {
        printf("%f\n",a/d);
    }else if(op == "?")
    {
        break;
    }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |     if(op == "+")
      |        ~~~^~~~~~
a.cc:19:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     }else if(op == "-")
      |              ~~~^~~~~~
a.cc:22:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |     }else if(op == "*")
      |              ~~~^~~~~~
a.cc:25:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   25 |     }else if(op == "/")
      |              ~~~^~~~~~
a.cc:27:25: error: 'd' was not declared in this scope
   27 |         printf("%f\n",a/d);
      |                         ^
a.cc:28:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |     }else if(op == "?")
      |              ~~~^~~~~~
Language: C++

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

int main()
{
    int a;
    char op;
    int b;
    
    for(int i = 0; ; i++)
    {
        scanf("%d",&a);
        scanf("%c",&op);
        scanf("%d",&b);
    
    if(op == '+')
    {
        printf("%d\n",a+b);
    }else if(op == '-')
    {
        printf("%d\n", a-b);
    }else if(op == '*')
    {
        printf("%d\n",a*b);
    }else if(op == '/')
    {
        printf("%f\n",a/d);
    }else if(op == '?')
    {
        break;
    }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:25: error: 'd' was not declared in this scope
   27 |         printf("%f\n",a/d);
      |                         ^
Language: C++

#include<stdio.h>
using namespace std;

int a= 0, int b = 0, int op = 0;
int c = 0;
int main() {
  scanf("%d %d %d", &a, &b, &op);
  
  c = a op b;
    printf("%d\n",c);

}


Compiler output:
a.cc:4:11: error: expected unqualified-id before 'int'
    4 | int a= 0, int b = 0, int op = 0;
      |           ^~~
a.cc: In function 'int main()':
a.cc:7:26: error: 'b' was not declared in this scope
    7 |   scanf("%d %d %d", &a, &b, &op);
      |                          ^
a.cc:7:30: error: 'op' was not declared in this scope
    7 |   scanf("%d %d %d", &a, &b, &op);
      |                              ^~
a.cc:9:8: error: expected ';' before 'op'
    9 |   c = a op b;
      |        ^~~
      |        ;
Language: C++

#include<stdio.h>
using namespace std;

int a= 0, int b = 0,bool op = 0;
int c = 0;
int main() {
  scanf("%d %d %d", &a, &b, &op);
  
  c = a op b;
    printf("%d\n",c);

}


Compiler output:
a.cc:4:11: error: expected unqualified-id before 'int'
    4 | int a= 0, int b = 0,bool op = 0;
      |           ^~~
a.cc: In function 'int main()':
a.cc:7:26: error: 'b' was not declared in this scope
    7 |   scanf("%d %d %d", &a, &b, &op);
      |                          ^
a.cc:7:30: error: 'op' was not declared in this scope
    7 |   scanf("%d %d %d", &a, &b, &op);
      |                              ^~
a.cc:9:8: error: expected ';' before 'op'
    9 |   c = a op b;
      |        ^~~
      |        ;
Language: C++

#include<stdio.h>
using namespace std;

int a= 0, int b = 0,bool op = 0;
int c = 0;
int main() {
  scanf("%d %d %s", &a, &b, &op);
  
  c = a op b;
    printf("%d\n",c);

}


Compiler output:
a.cc:4:11: error: expected unqualified-id before 'int'
    4 | int a= 0, int b = 0,bool op = 0;
      |           ^~~
a.cc: In function 'int main()':
a.cc:7:26: error: 'b' was not declared in this scope
    7 |   scanf("%d %d %s", &a, &b, &op);
      |                          ^
a.cc:7:30: error: 'op' was not declared in this scope
    7 |   scanf("%d %d %s", &a, &b, &op);
      |                              ^~
a.cc:9:8: error: expected ';' before 'op'
    9 |   c = a op b;
      |        ^~~
      |        ;
Language: C++

#include<stdio.h>
using namespace std;

int a= 0, int b = 0,char op = 0;
int c = 0;
int main() {
  scanf("%d %d %s", &a, &b, &op);
  
  c = a op b;
    printf("%d\n",c);

}


Compiler output:
a.cc:4:11: error: expected unqualified-id before 'int'
    4 | int a= 0, int b = 0,char op = 0;
      |           ^~~
a.cc: In function 'int main()':
a.cc:7:26: error: 'b' was not declared in this scope
    7 |   scanf("%d %d %s", &a, &b, &op);
      |                          ^
a.cc:7:30: error: 'op' was not declared in this scope
    7 |   scanf("%d %d %s", &a, &b, &op);
      |                              ^~
a.cc:9:8: error: expected ';' before 'op'
    9 |   c = a op b;
      |        ^~~
      |        ;
Language: C++

#include<stdio.h>
using namespace std;


int a = 0, b = 0, op = 0;
int c = 0;
int main(){ 
    scanf("%d %d %c", &a, &b, &op);


if(op == +){
    c = a + b;
      printf("%d\n",c);

}


if(op == -){
      c = a - b;
      printf("%d\n",c);
}


if(op == *){
      c = a * b;
      printf("%d\n",c);
}


if(op == /){
      c = a / b;
      printf("%d\n",c);
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: expected primary-expression before ')' token
   11 | if(op == +){
      |           ^
a.cc:18:11: error: expected primary-expression before ')' token
   18 | if(op == -){
      |           ^
a.cc:24:11: error: expected primary-expression before ')' token
   24 | if(op == *){
      |           ^
a.cc:30:10: error: expected primary-expression before '/' token
   30 | if(op == /){
      |          ^
a.cc:30:11: error: expected primary-expression before ')' token
   30 | if(op == /){
      |           ^
Language: C++

#include<stdio.h>
using namespace std;


int a = 0, b = 0, op = 0;
int c = 0;
int main(){ 
    scanf("%d %d %c", &a, &b, &op);

while(1){
    if(op == '?'){
        break;
    }
    }
    if(op == '+'){
    c = a + b;
      printf("%d\n",c);

}
if(op == '-'){
      c = a - b;
      printf("%d\n",c);
}
if(op == '*'){
      c = a * b;
      printf("%d\n",c);
}
if(op == '/'){
      c = a / b;
      printf("%d\n",c);
}
}
}



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

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

int main(){
    int a,b;
    char o[1];
    for (;;) {
        scanf("%d %c %d",&a,o,&m);
        if (o[0]=='?') break;
        if (o[0]=='+') printf("%d\n",a+b);
        else if (o[0]=='-') printf("%d\n",a-b);
        else if (o[0]=='*') printf("%d\n",a*b);
        else if (o[0]=='/') printf("%d\n",a/b);
    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:32: error: 'm' was not declared in this scope
    8 |         scanf("%d %c %d",&a,o,&m);
      |                                ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'a' was not declared in this scope; did you mean 'sa'?
    6 |     cin >> a >> op >> b;
      |            ^
      |            sa
a.cc:6:23: error: 'b' was not declared in this scope; did you mean 'sb'?
    6 |     cin >> a >> op >> b;
      |                       ^
      |                       sb
a.cc:19:16: error: expected ';' before 'return'
   19 |     } while (1)
      |                ^
      |                ;
   20 | 
   21 |     return 0;
      |     ~~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:38: error: expected ';' before '}' token
   16 |                 cout << a / b << endl
      |                                      ^
      |                                      ;
   17 |             }
      |             ~                         
a.cc:20:16: error: expected ';' before 'return'
   20 |     } while (1)
      |                ^
      |                ;
   21 | 
   22 |     return 0;
      |     ~~~~~~
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: expected ';' before 'return'
   20 |     } while (1)
      |                ^
      |                ;
   21 | 
   22 |     return 0;
      |     ~~~~~~
Language: C++

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

int main() {
    int a, b;
    char sa, sb, op;
    
    do {
        cin >> sa;
        if (sa == '?') {
            break;
        } else {
            cin >> op >> sb;
        }
        
        a = atoi(sa); b = atoi(sb);
        if (op == '+') cout << a + b << endl;
        if (op == '-') cout << a - b << endl;
        if (op == '*') cout << a * b << endl;
        if (op == '/') {
            if (b == 0) {
                continue;
            } else {
                cout << a / b << endl;
            }
        }
        if (sa == '?' || op == '?') break;
    } while (1);
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:18: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   16 |         a = atoi(sa); b = atoi(sb);
      |                  ^~
      |                  |
      |                  char
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
a.cc:16:32: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
   16 |         a = atoi(sa); b = atoi(sb);
      |                                ^~
      |                                |
      |                                char
/usr/include/stdlib.h:105:30: note:   initializing argument 1 of 'int atoi(const char*)'
  105 | extern int atoi (const char *__nptr)
      |                  ~~~~~~~~~~~~^~~~~~
Language: C++

#include<iostream>
#include<stdio.h>

using namespace std;
int main(){
    int a,b;
    while (cin >> a >> op >>b && op!="?" ){
        if (op =="+"){
            cout << a+b << endl;
        } else if (op=="-"){
            cout << a-b << endl; 
        } else if (op=="*"){
            cout << a*b << endl;
        } else{
            cout << a/b <<
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: 'op' was not declared in this scope
    7 |     while (cin >> a >> op >>b && op!="?" ){
      |                        ^~
a.cc:16:9: error: expected primary-expression before '}' token
   16 |         }
      |         ^
Language: C++

#include<iostream>
#include<stdio.h>

using namespace std;
int main(){
    int a,b;
    while (cin >> a >> op >>b && op!="?" ){
        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:24: error: 'op' was not declared in this scope
    7 |     while (cin >> a >> op >>b && op!="?" ){
      |                        ^~