Language: C++

using namespace std;
int main(){
    int a,b;
        string op;
    cin >> a >> op >> b;
    while(1){
        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:4:9: error: 'string' was not declared in this scope
    4 |         string op;
      |         ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin >> a >> op >> b;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:5:17: error: 'op' was not declared in this scope
    5 |     cin >> a >> op >> b;
      |                 ^~
a.cc:8:13: error: 'cout' was not declared in this scope
    8 |             cout << a+b << endl;
      |             ^~~~
a.cc:8:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:28: error: 'endl' was not declared in this scope
    8 |             cout << a+b << endl;
      |                            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:11:13: error: 'cout' was not declared in this scope
   11 |             cout << a-b <<endl;
      |             ^~~~
a.cc:11:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:27: error: 'endl' was not declared in this scope
   11 |             cout << a-b <<endl;
      |                           ^~~~
a.cc:11:27: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:14:13: error: 'cout' was not declared in this scope
   14 |             cout << a*b << endl;
      |             ^~~~
a.cc:14:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:28: error: 'endl' was not declared in this scope
   14 |             cout << a*b << endl;
      |                            ^~~~
a.cc:14:28: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:17:13: error: 'cout' was not declared in this scope
   17 |             cout << a/b << endl;
      |             ^~~~
a.cc:17:13: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:28: error: 'endl' was not declared in this scope
   17 |             cout << a/b << endl;
      |                            ^~~~
a.cc:17:28: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'