Language: C++

#include<iostream>
using namespace
 
int main(){

int x , y , z;
cin >> x >> y >> z;
 
while( z != ? ){

if( z == + ){

cout << x + y << endl;

}

else if( z == - ){

cout << x - y << endl;

}

else if ( z == *){

cout << x * y << endl;

}

else if ( z == / ){

cout << x / y << endl;

}
 
}

return 0 ;
 
}

Compiler output:
a.cc:4:1: error: expected identifier before 'int'
    4 | int main(){
      | ^~~
a.cc:2:16: error: expected ';' before 'int'
    2 | using namespace
      |                ^
      |                ;
    3 | 
    4 | int main(){
      | ~~~             
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 | cin >> x >> y >> z;
      | ^~~
      | 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:9:13: error: expected primary-expression before '?' token
    9 | while( z != ? ){
      |             ^
a.cc:9:15: error: expected primary-expression before ')' token
    9 | while( z != ? ){
      |               ^
a.cc:9:14: error: expected ':' before ')' token
    9 | while( z != ? ){
      |              ^~
      |              :
a.cc:9:15: error: expected primary-expression before ')' token
    9 | while( z != ? ){
      |               ^
a.cc:11:12: error: expected primary-expression before ')' token
   11 | if( z == + ){
      |            ^
a.cc:13:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 | cout << x + y << 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:13:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 | cout << x + y << 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:17:17: error: expected primary-expression before ')' token
   17 | else if( z == - ){
      |                 ^
a.cc:19:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   19 | cout << x - y << 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:19:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 | cout << x - y << endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:23:17: error: expected primary-expression before ')' token
   23 | else if ( z == *){
      |                 ^
a.cc:25:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   25 | cout << x * y << 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:25:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   25 | cout << x * y << endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:29:16: error: expected primary-expression before '/' token
   29 | else if ( z == / ){
      |                ^
a.cc:29:18: error: expected primary-expression before ')' token
   29 | else if ( z == / ){
      |                  ^
a.cc:31:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   31 | cout << x / y << 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:31:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   31 | cout << x / y << endl;
      |                  ^~~~
      |                  std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~