Language: C++

#include<iostream>
int main(){
    int a,b,K;
    char op;
    while(1){
        cin>>a>>op>>b;
        if (op=='?') break;
        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;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin>>a>>op>>b;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:21: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         if (op='+') cout<<a+b<<endl;
      |                     ^~~~
      |                     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |         if (op='+') cout<<a+b<<endl;
      |                                ^~~~
      |                                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:9:26: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         else if(op=='-') cout<<a-b<<endl;
      |                          ^~~~
      |                          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:37: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |         else if(op=='-') cout<<a-b<<endl;
      |                                     ^~~~
      |                                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:26: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |         else if(op=='*') cout<<a*b<<endl;
      |                          ^~~~
      |                          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:37: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |         else if(op=='*') cout<<a*b<<endl;
      |                                     ^~~~
      |                                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:11:26: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |         else if(op=='/') cout<<a/b<<endl;
      |                          ^~~~
      |                          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:37: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |         else if(op=='/') cout<<a/b<<endl;
      |                                     ^~~~
      |                                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~