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

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

int main(){

  while(1)}
    int a, b;
    string op;
    cin>>a>>op>>b; 
    if(op == "?") break;     

    int ans;
    if(op == "+") ans = a + b;
    if(op == "-") ans = a - b;
    if(op == "*") ans = a * b;
    if(op == "/") ans = a / b;

    cout<<ans<<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:6:11: error: expected primary-expression before '}' token
    6 |   while(1)}
      |           ^
a.cc: At global scope:
a.cc:8:5: error: 'string' does not name a type; did you mean 'stdin'?
    8 |     string op;
      |     ^~~~~~
      |     stdin
a.cc:9:5: error: 'cin' does not name a type
    9 |     cin>>a>>op>>b;
      |     ^~~
a.cc:10:5: error: expected unqualified-id before 'if'
   10 |     if(op == "?") break;
      |     ^~
a.cc:13:5: error: expected unqualified-id before 'if'
   13 |     if(op == "+") ans = a + b;
      |     ^~
a.cc:14:5: error: expected unqualified-id before 'if'
   14 |     if(op == "-") ans = a - b;
      |     ^~
a.cc:15:5: error: expected unqualified-id before 'if'
   15 |     if(op == "*") ans = a * b;
      |     ^~
a.cc:16:5: error: expected unqualified-id before 'if'
   16 |     if(op == "/") ans = a / b;
      |     ^~
a.cc:18:5: error: 'cout' does not name a type
   18 |     cout<<ans<<endl;
      |     ^~~~
a.cc:19:3: error: expected declaration before '}' token
   19 |   }
      |   ^
a.cc:20:3: error: expected unqualified-id before 'return'
   20 |   return 0;
      |   ^~~~~~
a.cc:21:2: error: expected declaration before '}' token
   21 |  }
      |  ^
Language: C++

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

int main(){

  while(1){
    int a, b;
    string op;
    cin>>a>>op>>b; 
    if(op == "?") break;     

    int ans;
    if(op == "+") ans = a + b;
    if(op == "-") ans = a - b;
    if(op == "*") ans = a * b;
    if(op == "/") ans = a / b;

    cout<<ans<<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:8:5: error: 'string' was not declared in this scope
    8 |     string op;
      |     ^~~~~~
a.cc:8:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:9:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |     cin>>a>>op>>b;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/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: 'op' was not declared in this scope
    9 |     cin>>a>>op>>b;
      |             ^~
a.cc:18:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |     cout<<ans<<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:18:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |     cout<<ans<<endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){

  while(1){
    int a, b;
    string op;
    cin>>a>>op>>b; 
    if(op == "?") break;     

    int ans;
    if(op == "+") ans = a + b;
    if(op == "-") ans = a - b;
    if(op == "*") ans = a * b;
    if(op == "/") ans = a / b;

    cout<<ans<<endl;
  } 
  return ０；
 }



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:8:5: error: 'string' was not declared in this scope
    8 |     string op;
      |     ^~~~~~
a.cc:8:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:9:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |     cin>>a>>op>>b;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/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: 'op' was not declared in this scope
    9 |     cin>>a>>op>>b;
      |             ^~
a.cc:18:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |     cout<<ans<<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:18:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   18 |     cout<<ans<<endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:20:10: error: '\U0000ff10\U0000ff1b' was not declared in this scope
   20 |   return ０；
      |          ^~~~
a.cc:20:14: error: expected ';' before '}' token
   20 |   return ０；
      |              ^
      |              ;
   21 |  }
      |  ~
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected primary-expression before '?' token
    8 | while(op !=?){
      |            ^
a.cc:8:13: error: expected primary-expression before ')' token
    8 | while(op !=?){
      |             ^
a.cc:8:13: error: expected ':' before ')' token
    8 | while(op !=?){
      |             ^
      |             :
a.cc:8:13: error: expected primary-expression before ')' token
Language: C++

#include<iostream>
using namespace std;

int main() {
  int a,b;
  char op;
  while(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 if(op==?) break;
  }
  return 0
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: expected primary-expression before ')' token
    9 |     if(op==+){
      |             ^
a.cc:11:19: error: expected primary-expression before ')' token
   11 |     }else if(op==-){
      |                   ^
a.cc:13:19: error: expected primary-expression before ')' token
   13 |     }else if(op==*){
      |                   ^
a.cc:15:18: error: expected primary-expression before '/' token
   15 |     }else if(op==/){
      |                  ^
a.cc:15:19: error: expected primary-expression before ')' token
   15 |     }else if(op==/){
      |                   ^
a.cc:17:18: error: expected primary-expression before '?' token
   17 |     }else if(op==?) break;
      |                  ^
a.cc:17:19: error: expected primary-expression before ')' token
   17 |     }else if(op==?) break;
      |                   ^
a.cc:17:19: error: expected ':' before ')' token
   17 |     }else if(op==?) break;
      |                   ^
      |                   :
a.cc:17:19: error: expected primary-expression before ')' token
a.cc:19:11: error: expected ';' before '}' token
   19 |   return 0
      |           ^
      |           ;
   20 | }
      | ~
Language: C++

#include <iostream>
 int main() {
  int a, b;
  std::string op;
  std::cin >> a >> op >> b;
  std::cout << a op b <<std::endl;



 return 0;


}


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

#include <iostream>
 int main() {
  int a, b;
  std::string op;
  std::cin >> a >> op >> b;
  std::cout << a "op" b <<std::endl;



 return 0;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected ';' before string constant
    6 |   std::cout << a "op" b <<std::endl;
      |                 ^~~~~
      |                 ;
Language: C++

#include <iostream>
 int main() {
  int a, b;
  std::string op;
  std::cin >> a >> op >> b;
  if (op == "+") {
   std::cout << a + b <<std::endl;
  } else if (op == -) {
   std::cout << a - b <<std::endl;
  } else if (op == *) {
   std::cout << a * b <<std::endl;
  } else if (op == /) {
   std::cout << a / b <<std::endl;
  } else {
   exit (0);
  }





 return 0;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected primary-expression before ')' token
    8 |   } else if (op == -) {
      |                     ^
a.cc:10:21: error: expected primary-expression before ')' token
   10 |   } else if (op == *) {
      |                     ^
a.cc:12:20: error: expected primary-expression before '/' token
   12 |   } else if (op == /) {
      |                    ^
a.cc:12:21: error: expected primary-expression before ')' token
   12 |   } else if (op == /) {
      |                     ^
Language: C++

#include <iostream>
#include <iomanip>

using namespace std;
int main (){
  int a, b;
  string op;
  while True{
    cin >> a >> op >> b;
    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{
        cout << a / b << endl;
      }
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected '(' before 'True'
    8 |   while True{
      |         ^~~~
      |         (
a.cc:8:9: error: 'True' was not declared in this scope
    8 |   while True{
      |         ^~~~
a.cc:8:13: error: expected ')' before '{' token
    8 |   while True{
      |         ~~~~^
      |             )
Language: C++

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

int main(){
   int a,b,op;
   cin>> a >> op >> b;
   for(int x = 0;;x++){
      if(op == ?){
         break;
      }
      cout << a << " " << op << " " << b << endl;
   return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected primary-expression before '?' token
    8 |       if(op == ?){
      |                ^
a.cc:8:17: error: expected primary-expression before ')' token
    8 |       if(op == ?){
      |                 ^
a.cc:8:17: error: expected ':' before ')' token
    8 |       if(op == ?){
      |                 ^
      |                 :
a.cc:8:17: error: expected primary-expression before ')' token
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main() {
String op;
int a,b;
cin >> a >> op >> b;
 if(op == "+") ans = a+b; while(true){
   if(op="?") break;

  int ans;
 if(op == "+") ans = a+b;
 if(op == "-") ans = a-b;
 if(op == "*") ans = a*b;
 if(op == "/") ans = a/b;
  cout<< ans <<endl;
  }
  return 0; 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:1: error: 'String' was not declared in this scope
    5 | String op;
      | ^~~~~~
a.cc:7:13: error: 'op' was not declared in this scope
    7 | cin >> a >> op >> b;
      |             ^~
a.cc:8:16: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |  if(op == "+") ans = a+b; while(true){
      |                ^~~
      |                abs
Language: C++

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

int main(){
    while(1){
        if(op=='?')break;
        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 cout<<a/b<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: 'op' was not declared in this scope
    6 |         if(op=='?')break;
      |            ^~
Language: C++

#include<iostream>
using namespace std;
int main(){
int a,b;
char op;
while(op!='?'){
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;
}
return 0
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: expected ';' before '}' token
   13 | return 0
      |         ^
      |         ;
   14 | }
      | ~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: expected ';' before '}' token
   14 | return 0
      |         ^
      |         ;
   15 | }
      | ~
Language: C++

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

int main() {
	int a,op,b;
	for (;;)
	{
		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;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |                 if (op=="+")
      |                     ~~^~~~~
a.cc:14:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |                 if (op=="-")
      |                     ~~^~~~~
a.cc:18:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                 if (op=="*")
      |                     ~~^~~~~
a.cc:22:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   22 |                 if (op=="/")
      |                     ~~^~~~~
a.cc:26:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |                 if (op=="?") break;
      |                     ~~^~~~~
Language: C++

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

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



Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: break statement not within loop or switch
   13 |   else 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{
  }
  while {
  cout << a op b << endl;
  }
  return 0;
}


Compiler output:
a.cc:8:12: error: stray '`' in program
    8 |  if( op == `+`){
      |            ^
a.cc:8:14: error: stray '`' in program
    8 |  if( op == `+`){
      |              ^
a.cc:10:18: error: stray '`' in program
   10 |   }else if(op == `-`){
      |                  ^
a.cc:10:20: error: stray '`' in program
   10 |   }else if(op == `-`){
      |                    ^
a.cc:12:18: error: stray '`' in program
   12 |   }else if(op == `*`){
      |                  ^
a.cc:12:20: error: stray '`' in program
   12 |   }else if(op == `*`){
      |                    ^
a.cc:13:1: error: extended character 　 is not valid in an identifier
   13 | 　cout << a*b << endl;
      | ^
a.cc:14:19: error: stray '`' in program
   14 |   }else if (op == `/`){
      |                   ^
a.cc:14:21: error: stray '`' in program
   14 |   }else if (op == `/`){
      |                     ^
a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before ')' token
    8 |  if( op == `+`){
      |               ^
a.cc:10:21: error: expected primary-expression before ')' token
   10 |   }else if(op == `-`){
      |                     ^
a.cc:12:21: error: expected primary-expression before ')' token
   12 |   }else if(op == `*`){
      |                     ^
a.cc:13:1: error: '\U00003000cout' was not declared in this scope
   13 | 　cout << a*b << endl;
      | ^~~~~~
a.cc:14:20: error: expected primary-expression before '/' token
   14 |   }else if (op == `/`){
      |                    ^
a.cc:14:22: error: expected primary-expression before ')' token
   14 |   }else if (op == `/`){
      |                      ^
a.cc:18:9: error: expected '(' before '{' token
   18 |   while {
      |         ^
      |         (
a.cc:18:9: error: expected primary-expression before '{' token
a.cc:18:8: error: expected ')' before '{' token
   18 |   while {
      |        ^~
      |        )
a.cc:19:12: error: expected ';' before 'op'
   19 |   cout << a op b << endl;
      |            ^~~
      |            ;
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{
  }
  for (cout << a op b << endl;)
  return 0;
}


Compiler output:
a.cc:8:12: error: stray '`' in program
    8 |  if( op == `+`){
      |            ^
a.cc:8:14: error: stray '`' in program
    8 |  if( op == `+`){
      |              ^
a.cc:10:18: error: stray '`' in program
   10 |   }else if(op == `-`){
      |                  ^
a.cc:10:20: error: stray '`' in program
   10 |   }else if(op == `-`){
      |                    ^
a.cc:12:18: error: stray '`' in program
   12 |   }else if(op == `*`){
      |                  ^
a.cc:12:20: error: stray '`' in program
   12 |   }else if(op == `*`){
      |                    ^
a.cc:13:1: error: extended character 　 is not valid in an identifier
   13 | 　cout << a*b << endl;
      | ^
a.cc:14:19: error: stray '`' in program
   14 |   }else if (op == `/`){
      |                   ^
a.cc:14:21: error: stray '`' in program
   14 |   }else if (op == `/`){
      |                     ^
a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before ')' token
    8 |  if( op == `+`){
      |               ^
a.cc:10:21: error: expected primary-expression before ')' token
   10 |   }else if(op == `-`){
      |                     ^
a.cc:12:21: error: expected primary-expression before ')' token
   12 |   }else if(op == `*`){
      |                     ^
a.cc:13:1: error: '\U00003000cout' was not declared in this scope
   13 | 　cout << a*b << endl;
      | ^~~~~~
a.cc:14:20: error: expected primary-expression before '/' token
   14 |   }else if (op == `/`){
      |                    ^
a.cc:14:22: error: expected primary-expression before ')' token
   14 |   }else if (op == `/`){
      |                      ^
a.cc:18:17: error: expected ';' before 'op'
   18 |   for (cout << a op b << endl;)
      |                 ^~~
      |                 ;
a.cc:18:31: error: expected primary-expression before ')' token
   18 |   for (cout << a op b << endl;)
      |                               ^
a.cc:18:31: error: expected ';' before ')' token
   18 |   for (cout << a op b << endl;)
      |                               ^
      |                               ;
Language: C++

#include<iostream>
using namespace std;

int main(){
 int a,b;
 char op;
  while(1){
      cin >> a >> op >> b;
      if( op == / && (a == 0|| b==0))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;
  }else{
  };
 return 0;
}


Compiler output:
a.cc:11:14: error: stray '`' in program
   11 |   if ( op == `+` ){
      |              ^
a.cc:11:16: error: stray '`' in program
   11 |   if ( op == `+` ){
      |                ^
a.cc:13:20: error: stray '`' in program
   13 |   }else if ( op == `-` ){
      |                    ^
a.cc:13:22: error: stray '`' in program
   13 |   }else if ( op == `-` ){
      |                      ^
a.cc:15:20: error: stray '`' in program
   15 |   }else if ( op == `*`){
      |                    ^
a.cc:15:22: error: stray '`' in program
   15 |   }else if ( op == `*`){
      |                      ^
a.cc:17:20: error: stray '`' in program
   17 |   }else if ( op == `/`){
      |                    ^
a.cc:17:22: error: stray '`' in program
   17 |   }else if ( op == `/`){
      |                      ^
a.cc: In function 'int main()':
a.cc:9:17: error: expected primary-expression before '/' token
    9 |       if( op == / && (a == 0|| b==0))break;
      |                 ^
a.cc:9:22: error: expected identifier before '(' token
    9 |       if( op == / && (a == 0|| b==0))break;
      |                      ^
a.cc:9:21: error: expected ')' before '(' token
    9 |       if( op == / && (a == 0|| b==0))break;
      |         ~           ^~
      |                     )
a.cc:11:18: error: expected primary-expression before ')' token
   11 |   if ( op == `+` ){
      |                  ^
a.cc:13:24: error: expected primary-expression before ')' token
   13 |   }else if ( op == `-` ){
      |                        ^
a.cc:15:23: error: expected primary-expression before ')' token
   15 |   }else if ( op == `*`){
      |                       ^
a.cc:17:21: error: expected primary-expression before '/' token
   17 |   }else if ( op == `/`){
      |                     ^
a.cc:17:23: error: expected primary-expression before ')' token
   17 |   }else if ( op == `/`){
      |                       ^
Language: C++

#include<iostream>
using namespace std;

int main(){
 int a,b;
 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;
  }else{*
  };
 return 0;
}


Compiler output:
a.cc:11:14: error: stray '`' in program
   11 |   if ( op == `+` ){
      |              ^
a.cc:11:16: error: stray '`' in program
   11 |   if ( op == `+` ){
      |                ^
a.cc:13:20: error: stray '`' in program
   13 |   }else if ( op == `-` ){
      |                    ^
a.cc:13:22: error: stray '`' in program
   13 |   }else if ( op == `-` ){
      |                      ^
a.cc:15:20: error: stray '`' in program
   15 |   }else if ( op == `*`){
      |                    ^
a.cc:15:22: error: stray '`' in program
   15 |   }else if ( op == `*`){
      |                      ^
a.cc:17:20: error: stray '`' in program
   17 |   }else if ( op == `/`){
      |                    ^
a.cc:17:22: error: stray '`' in program
   17 |   }else if ( op == `/`){
      |                      ^
a.cc: In function 'int main()':
a.cc:9:14: error: expected primary-expression before '?' token
    9 |       if(op==?)break
      |              ^
a.cc:9:15: error: expected primary-expression before ')' token
    9 |       if(op==?)break
      |               ^
a.cc:9:15: error: expected ':' before ')' token
    9 |       if(op==?)break
      |               ^
      |               :
a.cc:9:15: error: expected primary-expression before ')' token
a.cc:9:21: error: expected ';' before '}' token
    9 |       if(op==?)break
      |                     ^
      |                     ;
   10 |       }
      |       ~              
a.cc:11:18: error: expected primary-expression before ')' token
   11 |   if ( op == `+` ){
      |                  ^
a.cc:13:24: error: expected primary-expression before ')' token
   13 |   }else if ( op == `-` ){
      |                        ^
a.cc:15:23: error: expected primary-expression before ')' token
   15 |   }else if ( op == `*`){
      |                       ^
a.cc:17:21: error: expected primary-expression before '/' token
   17 |   }else if ( op == `/`){
      |                     ^
a.cc:17:23: error: expected primary-expression before ')' token
   17 |   }else if ( op == `/`){
      |                       ^
a.cc:20:3: error: expected primary-expression before '}' token
   20 |   };
      |   ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int a,b;
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:8:8: error: expected primary-expression before '?' token
    8 | if(op==?)break;
      |        ^
a.cc:8:9: error: expected primary-expression before ')' token
    8 | if(op==?)break;
      |         ^
a.cc:8:9: error: expected ':' before ')' token
    8 | if(op==?)break;
      |         ^
      |         :
a.cc:8:9: error: expected primary-expression before ')' token
a.cc:9:9: error: expected primary-expression before ')' token
    9 | if(op==+){
      |         ^
a.cc:11:15: error: expected primary-expression before ')' token
   11 | }else if(op==-){
      |               ^
a.cc:13:15: error: expected primary-expression before ')' token
   13 | }else if(op==*){
      |               ^
a.cc:15:14: error: expected primary-expression before '/' token
   15 | }else if(op==/){
      |              ^
a.cc:15:15: error: expected primary-expression before ')' token
   15 | }else if(op==/){
      |               ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int a,b;
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:8:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 | if(op=="?")break;
      |    ~~^~~~~
a.cc:9:6: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 | if(op=="+"){
      |    ~~^~~~~
a.cc:11:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 | }else 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;
 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{
 };
 return 0;
}


Compiler output:
a.cc:8:12: error: stray '`' in program
    8 |  if( op == `+`){
      |            ^
a.cc:8:14: error: stray '`' in program
    8 |  if( op == `+`){
      |              ^
a.cc:10:19: error: stray '`' in program
   10 |  }else if ( op == `-`)
      |                   ^
a.cc:10:21: error: stray '`' in program
   10 |  }else if ( op == `-`)
      |                     ^
a.cc:12:19: error: stray '`' in program
   12 |  }else if ( op == `*`)
      |                   ^
a.cc:12:21: error: stray '`' in program
   12 |  }else if ( op == `*`)
      |                     ^
a.cc:14:18: error: stray '`' in program
   14 |  }else if (op == `/`)
      |                  ^
a.cc:14:20: error: stray '`' in program
   14 |  }else if (op == `/`)
      |                    ^
a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before ')' token
    8 |  if( op == `+`){
      |               ^
a.cc:10:22: error: expected primary-expression before ')' token
   10 |  }else if ( op == `-`)
      |                      ^
a.cc: At global scope:
a.cc:12:3: error: expected unqualified-id before 'else'
   12 |  }else if ( op == `*`)
      |   ^~~~
a.cc:14:2: error: expected declaration before '}' token
   14 |  }else if (op == `/`)
      |  ^
a.cc:14:3: error: expected unqualified-id before 'else'
   14 |  }else if (op == `/`)
      |   ^~~~
a.cc:16:2: error: expected declaration before '}' token
   16 |  }else{
      |  ^
a.cc:16:3: error: expected unqualified-id before 'else'
   16 |  }else{
      |   ^~~~
a.cc:18:2: error: expected unqualified-id before 'return'
   18 |  return 0;
      |  ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
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{
 };
 return 0;
}


Compiler output:
a.cc:12:3: error: expected unqualified-id before 'else'
   12 |  }else if ( op == '*')
      |   ^~~~
a.cc:14:2: error: expected declaration before '}' token
   14 |  }else if (op == '/')
      |  ^
a.cc:14:3: error: expected unqualified-id before 'else'
   14 |  }else if (op == '/')
      |   ^~~~
a.cc:16:2: error: expected declaration before '}' token
   16 |  }else{
      |  ^
a.cc:16:3: error: expected unqualified-id before 'else'
   16 |  }else{
      |   ^~~~
a.cc:18:2: error: expected unqualified-id before 'return'
   18 |  return 0;
      |  ^~~~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
 int a,b;
 char op;
 while(1){
    cin >> a >> op >> b;
    if ( op == / && ( a==0 || b==0))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;
 }else{
 };
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected primary-expression before '/' token
    9 |     if ( op == / && ( a==0 || b==0))break;
      |                ^
a.cc:9:21: error: expected identifier before '(' token
    9 |     if ( op == / && ( a==0 || b==0))break;
      |                     ^
a.cc:9:20: error: expected ')' before '(' token
    9 |     if ( op == / && ( a==0 || b==0))break;
      |        ~           ^~
      |                    )
Language: C++

#include <iostream>
using namespace std;

int main(){
 int a,b;
 char op;
 while(1){
    cin >> a >> op >> b;
    if ( op == / && b==0)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;
 }else{
 };
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected primary-expression before '/' token
    9 |     if ( op == / && b==0)break;
      |                ^
a.cc:9:21: error: label 'b' used but not defined
    9 |     if ( op == / && b==0)break;
      |                     ^
Language: C++

#include <iostream>
using namespace std;

int main(){
 int a,b;
 char op;
 while(1){
    cin >> a >> op >> b;
    if ( op == / && b == 0 )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;
 }else{
 };
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: expected primary-expression before '/' token
    9 |     if ( op == / && b == 0 )break;
      |                ^
a.cc:9:21: error: label 'b' used but not defined
    9 |     if ( op == / && b == 0 )break;
      |                     ^
Language: C++

#include <iostream>
using namespace std;

int main(){
 int a,b;
 char op;
 do{
   cin >> a >> op >> b;
 }while(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{
 };
 return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before 'if'
    9 |  }while(op != '?')
      |                   ^
      |                   ;
   10 |   if( op == '+'){
      |   ~~
Language: C++

/*
 * iraira.cpp
 *
 *  Created on: 2018/05/02
 *      Author: J01003
 */
/*
 * taete.cpp
 *
 *  Created on: 2018/04/26
 *      Author: J01003
 */
#include<iostream>
#include<stdio.h>
using namespace std;

int main(){
    int a,b,op;
    while(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 if(op =="?"){
    	break;
    }
    }
	return 0;
}




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

int main()
{
	cout >>> "aa";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cout' was not declared in this scope
    3 |         cout >>> "aa";
      |         ^~~~
a.cc:3:16: error: expected primary-expression before '>' token
    3 |         cout >>> "aa";
      |                ^
Language: C++

#include <iostream>
using namespace std;

int main()
{
	cout <<< "aa" <<< endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected primary-expression before '<' token
    6 |         cout <<< "aa" <<< endl;
      |                ^
a.cc:6:25: error: expected primary-expression before '<' token
    6 |         cout <<< "aa" <<< endl;
      |                         ^
Language: C++

#include<iostream>
#include<algorithm>
#include<stdio.h>
#include <math.h>
using namespace std;
int main(){
	char op;
	int a,b;
	for (;;){
		cin>>a>>op>>b;
	if(op=='?'){
		break;
	}
	if (op=='+'){
		cout<<a+b<<endl;
	}
	if (op=='-'){
		cout<<a-b<<endl;
	}
	if (op=='*')
		cout<<a/b<<endl;
	if (op=='/')
		cout<<a/b<<endl;
			return 0;
}



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

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

int main(){
  int a, b;
  string op;
  cin a>>op>>b;
  if(op == "?") break;

  int ans;
  if(op = "+") ans = a + b;
  if(op = "-") ans = a - b;
  if(op = "*") ans = a * b;
  if(op = "/") ans = a / b;

  count<<ans<<endl;
}
retrun 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected ';' before 'a'
    8 |   cin a>>op>>b;
      |      ^~
      |      ;
a.cc:9:17: error: break statement not within loop or switch
    9 |   if(op == "?") break;
      |                 ^~~~~
a.cc:12:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"+"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |   if(op = "+") ans = a + b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:13:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"-"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |   if(op = "-") ans = a - b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:14:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"*"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |   if(op = "*") ans = a * b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:15:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"/"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |   if(op = "/") ans = a / b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:17:8: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   17 |   count<<ans<<endl;
      |   ~~~~~^~~~~
a.cc: At global scope:
a.cc:19:1: error: 'retrun' does not name a type
   19 | retrun 0;
      | ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

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

int main(){
  int a, b;
  string op;
  cin a>>op>>b;
  if(op == "?") break;

  int ans;
  if(op = "+") ans = a + b;
  if(op = "-") ans = a - b;
  if(op = "*") ans = a * b;
  if(op = "/") ans = a / b;

  count<<ans<<endl;
}
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:6: error: expected ';' before 'a'
    8 |   cin a>>op>>b;
      |      ^~
      |      ;
a.cc:9:17: error: break statement not within loop or switch
    9 |   if(op == "?") break;
      |                 ^~~~~
a.cc:12:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"+"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |   if(op = "+") ans = a + b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:13:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"-"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |   if(op = "-") ans = a - b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:14:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"*"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |   if(op = "*") ans = a * b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:15:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"/"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |   if(op = "/") ans = a / b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:17:8: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   17 |   count<<ans<<endl;
      |   ~~~~~^~~~~
a.cc: At global scope:
a.cc:19:1: error: expected unqualified-id before 'return'
   19 | return 0;
      | ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

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

int main(){
  int a, b;
  string op;
  cin>>a>>op>>b;
  if(op == "?") break;

  int ans;
  if(op = "+") ans = a + b;
  if(op = "-") ans = a - b;
  if(op = "*") ans = a * b;
  if(op = "/") ans = a / b;

  count<<ans<<endl;
}
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: break statement not within loop or switch
    9 |   if(op == "?") break;
      |                 ^~~~~
a.cc:12:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"+"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |   if(op = "+") ans = a + b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:13:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"-"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |   if(op = "-") ans = a - b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:14:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"*"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |   if(op = "*") ans = a * b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:15:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"/"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |   if(op = "/") ans = a / b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:17:8: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   17 |   count<<ans<<endl;
      |   ~~~~~^~~~~
a.cc: At global scope:
a.cc:19:1: error: expected unqualified-id before 'return'
   19 | return 0;
      | ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

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

int main(){
    while(1){
  int a, b;
  string op;
  cin>>a>>op>>b;
  if(op == "?") break;

  int ans;
  if(op = "+") ans = a + b;
  if(op = "-") ans = a - b;
  if(op = "*") ans = a * b;
  if(op = "/") ans = a / b;

  count<<ans<<endl;
}
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"+"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |   if(op = "+") ans = a + b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:14:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"-"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |   if(op = "-") ans = a - b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:15:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"*"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   15 |   if(op = "*") ans = a * b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:16:9: error: could not convert 'op.std::__cxx11::basic_string<char>::operator=(((const char*)"/"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   16 |   if(op = "/") ans = a / b;
      |      ~~~^~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:18:8: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   18 |   count<<ans<<endl;
      |   ~~~~~^~~~~
Language: C++

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

int main(){

  while(1){
     int a, b;
     string op;
     cin>>a>>op>>b;
     if(op == "?") break;

     int ans;
     if(op == "+") ans = a + b;
     if(op == "-") ans = a - b;
     if(op == "*") ans = a * b;
     if(op == "/") ans = a / b;

     count<<ans<<endl;
   }
return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   19 |      count<<ans<<endl;
      |      ~~~~~^~~~~
Language: C++

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

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




Compiler output:
a.cc:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>

using namespace std;

int main() {
  int a,b;
  string op;
  cin >> a>>op>>b;
  while(1){
 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;
    }
  }
    return 0;
}



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

#include<iostream>
#include<iomanip>

using namespace std;

int main(void)

{
	double a, b;
	char op;
	while (cin >> a >> op >> b)
	{
		
		cout << fixed;
		cout << setprecision(0) << endl;

		if (op == '?')
			break;
		
		
		
		else if(c == '*')
		{
			cout <<a*b<< endl;

		}
		else if (c == '/')
		{
			cout <<a/b<< endl;

		}
		else if (c == '+')
		{
			cout << a + b << endl;
		}
		else if (c == '-')
		{
			cout << a - b << endl;


		}

		
		

	}

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: 'c' was not declared in this scope
   22 |                 else if(c == '*')
      |                         ^