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

#include <iostream>
using namespace std;

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

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

#include <iostream>
using namespace std;

int main() {
	int a, b, c;
	char op;
	cin >> a >> op >> b;
	while (op != 003F) {
		if (op == 002B) {
			c = a + b;
			cout << c << endl;
		}
		else if (op == 002D) {
			c = a - b;
			cout << c << endl;
		}
		else if (op == 002A) {
			c = a * b;
			cout << c << endl;
		}
		else if (op == 002F) {
			c = a / b;
			cout << c << endl;
		}
		cin >> a >> op >> b;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: unable to find numeric literal operator 'operator""F'
    8 |         while (op != 003F) {
      |                      ^~~~
a.cc:9:27: error: unable to find numeric literal operator 'operator""B'
    9 |                 if (op == 002B) {
      |                           ^~~~
a.cc:13:32: error: unable to find numeric literal operator 'operator""D'
   13 |                 else if (op == 002D) {
      |                                ^~~~
a.cc:17:32: error: unable to find numeric literal operator 'operator""A'
   17 |                 else if (op == 002A) {
      |                                ^~~~
a.cc:21:32: error: unable to find numeric literal operator 'operator""F'
   21 |                 else if (op == 002F) {
      |                                ^~~~
Language: C++

#include <stdio.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'c' was not declared in this scope
    8 |         if(c == '?') break;
      |            ^
a.cc:9:16: error: 'c' was not declared in this scope
    9 |         switch(c){
      |                ^
Language: C++

15
16
17
18
19
20
21
22
23
24
25
26
#include <stdio.h>
 
int main(){
    int a, b, r;
    char op;
    while(1){
        scanf("%d %c %d\n", &a, &op, &b);
        if(op == '?') break;
        switch(op){
            case '+':
                r = a + b;
                break;
            case '-':
                r = a - b;
                break;
            case '*':
                r = a * b;
                break;
            case '/':
                r = a / b;
                break;
        }
        printf("%d\n", r);
    }
    return 0;
}

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

a=[]
while True:
 n=input()
 if n=='0 ? 0':break
 a.append(n)
for s in a:
 t=s.split()
 if t[1]="/":
  print(t[0]//[1])
 else:
  b=eval(''.join(s.split()))
  print(b)

Compiler output:
a.cc:4:8: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    4 |  if n=='0 ? 0':break
      |        ^~~~~~~
a.cc:11:10: error: empty character constant
   11 |   b=eval(''.join(s.split()))
      |          ^~
a.cc:1:1: error: 'a' does not name a type
    1 | a=[]
      | ^
Language: C++

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

int main() {
	int a, b;
	char op;
	cin >> a >> op >> b;
	if (op == '+')cout << a + b;
	if (op == '-')cout << a - b;
	if (op == '*')cout << a*b;
	if (op == '/')cout << a / b;
	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++

// ConsoleApplication7.cpp : Defines the entry point for the console application.
//

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

int main() {
	int a, b;
	char op;
	cin >> a >> op >> b;
	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:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>

int main() {
int a, b;
char 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 {
break;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:1: error: break statement not within loop or switch
   21 | break;
      | ^~~~~
Language: C++

#include <iostream>
#include <cstdio>

int main() {
double a, b, c;
char op;
do{
std::cin >> a >> op >> b;

if( op == '+'){
c = a + b;
printf("%.0f\n", c);
}
else if( op == '-'){
c = a - b;
printf("%.0f\n", c);
}
else if( op == '*'){
c = a * b;
printf("%.0f\n", c);
}
else if( op == '/'){
c = a / b;
printf("%.0f\n", c);
}
else {
}
} while(!(op == '?'))
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:22: error: expected ';' before '}' token
   28 | } while(!(op == '?'))
      |                      ^
      |                      ;
   29 | }
      | ~
Language: C++

#include <iostream>

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

do{
std::cin >> a >> op >> b;

if(op == '+'){
std::cout << floor(a + b) << std::endl;
}
else if(op == '-'){
std::cout << floor(a - b) << std::endl;
}
else if(op == '*'){
std::cout << floor(a * b) << std::endl;
}
else if(op == '/'){
std::cout << floor(a / b) << std::endl;
}
else{
}
} while(!(op == ?));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: 'floor' was not declared in this scope
   11 | std::cout << floor(a + b) << std::endl;
      |              ^~~~~
a.cc:14:14: error: 'floor' was not declared in this scope
   14 | std::cout << floor(a - b) << std::endl;
      |              ^~~~~
a.cc:17:14: error: 'floor' was not declared in this scope
   17 | std::cout << floor(a * b) << std::endl;
      |              ^~~~~
a.cc:20:14: error: 'floor' was not declared in this scope
   20 | std::cout << floor(a / b) << std::endl;
      |              ^~~~~
a.cc:24:17: error: expected primary-expression before '?' token
   24 | } while(!(op == ?));
      |                 ^
a.cc:24:18: error: expected primary-expression before ')' token
   24 | } while(!(op == ?));
      |                  ^
a.cc:24:18: error: expected ':' before ')' token
   24 | } while(!(op == ?));
      |                  ^
      |                  :
a.cc:24:18: error: expected primary-expression before ')' token
Language: C++

#include <iostream>
#include <cstudio>

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

do{
std::cin >> a >> op >> b;

if(op == '+'){
std::cout << floor(a + b) << std::endl;
}
else if(op == '-'){
std::cout << floor(a - b) << std::endl;
}
else if(op == '*'){
std::cout << floor(a * b) << std::endl;
}
else if(op == '/'){
std::cout << floor(a / b) << std::endl;
}
else{
}
} while(!(op == ?));
}

Compiler output:
a.cc:2:10: fatal error: cstudio: No such file or directory
    2 | #include <cstudio>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <cstdio>

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

do{
std::cin >> a >> op >> b;

if(op == '+'){
std::cout << floor(a + b) << std::endl;
}
else if(op == '-'){
std::cout << floor(a - b) << std::endl;
}
else if(op == '*'){
std::cout << floor(a * b) << std::endl;
}
else if(op == '/'){
std::cout << floor(a / b) << std::endl;
}
else{
}
} while(!(op == ?));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: 'floor' was not declared in this scope
   12 | std::cout << floor(a + b) << std::endl;
      |              ^~~~~
a.cc:15:14: error: 'floor' was not declared in this scope
   15 | std::cout << floor(a - b) << std::endl;
      |              ^~~~~
a.cc:18:14: error: 'floor' was not declared in this scope
   18 | std::cout << floor(a * b) << std::endl;
      |              ^~~~~
a.cc:21:14: error: 'floor' was not declared in this scope
   21 | std::cout << floor(a / b) << std::endl;
      |              ^~~~~
a.cc:25:17: error: expected primary-expression before '?' token
   25 | } while(!(op == ?));
      |                 ^
a.cc:25:18: error: expected primary-expression before ')' token
   25 | } while(!(op == ?));
      |                  ^
a.cc:25:18: error: expected ':' before ')' token
   25 | } while(!(op == ?));
      |                  ^
      |                  :
a.cc:25:18: error: expected primary-expression before ')' token
Language: C++

#include <iostream>
#include <cmath>

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

do{
std::cin >> a >> op >> b;

if(op == '+'){
std::cout << floor(a + b) << std::endl;
}
else if(op == '-'){
std::cout << floor(a - b) << std::endl;
}
else if(op == '*'){
std::cout << floor(a * b) << std::endl;
}
else if(op == '/'){
std::cout << floor(a / b) << std::endl;
}
else{
}
} while(!(op == ?));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: expected primary-expression before '?' token
   25 | } while(!(op == ?));
      |                 ^
a.cc:25:18: error: expected primary-expression before ')' token
   25 | } while(!(op == ?));
      |                  ^
a.cc:25:18: error: expected ':' before ')' token
   25 | } while(!(op == ?));
      |                  ^
      |                  :
a.cc:25:18: error: expected primary-expression before ')' token
Language: C++

#include<iostream>
#include <string>
using namespace std;

int main()
{
	int a, b;
	string op = "";

	while (1)
	{
		cin >> a >> op >> b;

		if (op == "?")
		{
			return 0;
		}
		if (op == "+")
		{
			cout << a + b << "\n";
		}
		if (op == "-")
		{
			cout << a - b << "\n";
		}
		if (op == "*")
		{
			cout << a * b << "\n";
		}
		if (op == "/")
		{
			cout << a / b << "\n";
		}

		return 0;
	}

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

package main

import "fmt"

/*
 <url:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_4_C>
 */

func init() {
}

func main() {
	var a,b int
	var op string
	for{
		fmt.Scanf("%d %s %d",&a,&op,&b)
		if a == 0 && op == "?" && b == 0{
			break
		}
		if op == "+"{
			fmt.Println(a+b)
		}else if op == "-"{
			fmt.Println(a-b)
		}else if op == "*"{
			fmt.Println(a*b)
		}else if op == "/"{
			fmt.Println(a/b)
		}
	}
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:12:1: error: 'func' does not name a type
   12 | func main() {
      | ^~~~
Language: C++

#include <stdio.h>
 
using namespace std;
 
int main(){
    int a,b;
    char op;
    while(true){
        scanf("%d %c %d",&a,&op,&b);
        if(op == '?') ontinue;
        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: In function 'int main()':
a.cc:10:23: error: 'ontinue' was not declared in this scope
   10 |         if(op == '?') ontinue;
      |                       ^~~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(void) {
  int a, b;
  char op;
  cin >> a >> op >> b;

  switch(op) {
    case "+": 
      cout << a+b << endl;
    case "-":
      cout << a-b << endl;
    case "*":
      cout << a*b << endl;
    case "/":
      cout << a/b << endl;
    case "?":
      break;
    default:
      break;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: conversion from 'const char*' to 'int' in a converted constant expression
   10 |     case "+":
      |          ^~~
a.cc:10:10: error: could not convert '"+"' from 'const char [2]' to 'int'
   10 |     case "+":
      |          ^~~
      |          |
      |          const char [2]
a.cc:12:10: error: conversion from 'const char*' to 'int' in a converted constant expression
   12 |     case "-":
      |          ^~~
a.cc:12:10: error: could not convert '"-"' from 'const char [2]' to 'int'
   12 |     case "-":
      |          ^~~
      |          |
      |          const char [2]
a.cc:14:10: error: conversion from 'const char*' to 'int' in a converted constant expression
   14 |     case "*":
      |          ^~~
a.cc:14:10: error: could not convert '"*"' from 'const char [2]' to 'int'
   14 |     case "*":
      |          ^~~
      |          |
      |          const char [2]
a.cc:16:10: error: conversion from 'const char*' to 'int' in a converted constant expression
   16 |     case "/":
      |          ^~~
a.cc:16:10: error: could not convert '"/"' from 'const char [2]' to 'int'
   16 |     case "/":
      |          ^~~
      |          |
      |          const char [2]
a.cc:18:10: error: conversion from 'const char*' to 'int' in a converted constant expression
   18 |     case "?":
      |          ^~~
a.cc:18:10: error: could not convert '"?"' from 'const char [2]' to 'int'
   18 |     case "?":
      |          ^~~
      |          |
      |          const char [2]
Language: C++

#include <iostream>
using namespace std;

int main(void) {
  int a, b;
  char op;
  cin >> a >> op >> b;

  switch(op) {
    case '+': 
      cout << a+b << endl;
    case '-':
      cout << a-b << endl;
    case '*':
      cout << a*b << endl;
    case '/':
      cout << a/b << endl;
    case "?":
      break;
    default:
      break;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:10: error: conversion from 'const char*' to 'int' in a converted constant expression
   18 |     case "?":
      |          ^~~
a.cc:18:10: error: could not convert '"?"' from 'const char [2]' to 'int'
   18 |     case "?":
      |          ^~~
      |          |
      |          const char [2]
Language: C++

#include<iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main()
{
  int x,y;
  char op;

  while(true){
    cin >>r >>op >> y;
    if(op == '?') break;

    switch(op):
      case '+':
        cout << (x+y) << endl;
        break;
      case '-':
        cout << (x-y) << endl;
        break;
      case '*':
        cout << (x*y) << endl;
        break;
      case '/':
        cout << (x/y) << endl;
        break;
  }

}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'r' was not declared in this scope
   11 |     cin >>r >>op >> y;
      |           ^
a.cc:14:15: error: expected primary-expression before ':' token
   14 |     switch(op):
      |               ^
a.cc:18:7: error: case label ''-'' not within a switch statement
   18 |       case '-':
      |       ^~~~
a.cc:21:7: error: case label ''*'' not within a switch statement
   21 |       case '*':
      |       ^~~~
a.cc:24:7: error: case label ''/'' not within a switch statement
   24 |       case '/':
      |       ^~~~
Language: C++

#include<iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main()
{
  int x,y;
  char op;

  while(true){
    cin >>r >>op >> y;
    if(op == '?') break;

    switch(op):
      case '+':
        cout << (x+y) << endl;
        break;
      case '-':
        cout << (x-y) << endl;
        break;
      case '*':
        cout << (x*y) << endl;
        break;
      case '/':
        cout << (x/y) << endl;
        break;
      default:
        break;
  }

}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'r' was not declared in this scope
   11 |     cin >>r >>op >> y;
      |           ^
a.cc:14:15: error: expected primary-expression before ':' token
   14 |     switch(op):
      |               ^
a.cc:18:7: error: case label ''-'' not within a switch statement
   18 |       case '-':
      |       ^~~~
a.cc:21:7: error: case label ''*'' not within a switch statement
   21 |       case '*':
      |       ^~~~
a.cc:24:7: error: case label ''/'' not within a switch statement
   24 |       case '/':
      |       ^~~~
a.cc:27:7: error: case label not within a switch statement
   27 |       default:
      |       ^~~~~~~
Language: C++

#include<iostream>
#include <iomanip>
#include <math.h>
using namespace std;
int main()
{
  int x,y;
  char op;

  while(true){
    cin >>x >>op >> y;
    if(op == '?') break;

    switch(op):
      case '+':
        cout << (x+y) << endl;
        break;
      case '-':
        cout << (x-y) << endl;
        break;
      case '*':
        cout << (x*y) << endl;
        break;
      case '/':
        cout << (x/y) << endl;
        break;
      default:
        break;
  }

}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: expected primary-expression before ':' token
   14 |     switch(op):
      |               ^
a.cc:18:7: error: case label ''-'' not within a switch statement
   18 |       case '-':
      |       ^~~~
a.cc:21:7: error: case label ''*'' not within a switch statement
   21 |       case '*':
      |       ^~~~
a.cc:24:7: error: case label ''/'' not within a switch statement
   24 |       case '/':
      |       ^~~~
a.cc:27:7: error: case label not within a switch statement
   27 |       default:
      |       ^~~~~~~
Language: C++

#include <iostream>

int a.b;
char op;
int main(){
	while(std::cin >> a >> op >> b && op != '?'){
		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;
	}
}


Compiler output:
a.cc:3:6: error: expected initializer before '.' token
    3 | int a.b;
      |      ^
a.cc: In function 'int main()':
a.cc:6:27: error: 'a' was not declared in this scope
    6 |         while(std::cin >> a >> op >> b && op != '?'){
      |                           ^
a.cc:6:38: error: 'b' was not declared in this scope
    6 |         while(std::cin >> a >> op >> b && op != '?'){
      |                                      ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#define REP(i,m) for(long long i=0; i<m; i++)
#define FOR(i,n,m) for(long long i=n; i<m; i++)
using namespace std;

int main() {
	while(true){
		int a, b;
		char x;
		cin >> a >> x >> b;
		if(x == '?') break;
		if(x == '+') cout << a+b << endl;
		if(x == '-') cout << a-b << endl;
		if(x == "*") cout << a*b << endl;
		if(x == "/") cout << a/b << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |                 if(x == "*") cout << a*b << endl;
      |                    ~~^~~~~~
a.cc:17:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |                 if(x == "/") cout << a/b << endl;
      |                    ~~^~~~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <iomanip>
#include <string>
          
using namespace std;
          
int main() {
int a,b;
string op;
cin >> a >> s >>  b;
while(true){
if(op == "?") return 0;
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:12:13: error: 's' was not declared in this scope
   12 | cin >> a >> s >>  b;
      |             ^
Language: C++

#include <bits/stdc++.h>

int main(){
    int a,b;
    char op =' ';
    int f = 1;
    while(f){
        scanf("%d %c %d",&a,&b,&c);
        switch(c){
            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;
            default :f=0;
        }
    }
    
    return 0;
}


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

#include <bits/stdc++.h>

int main(){
    int a,b;
    char op =' ';
    int f = 1;
    while(f){
        scanf("%d %c %d",&a,&c,&b);
        switch(c){
            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;
            default :f=0;
        }
    }
    
    return 0;
}


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

while(True) :
    instr=input()
    if(instr=='?') : break
    a,op,b=input().split()
    a=int(a)
    b=int(b)
    if op=='+' :
        print("{}".format(a+b))
    elif op=='-' :
        print("{}".format(a-b))
    elif op=='*' :
        print("{}".format(a*b))
    else :
        print("{}".format(int(a/b)))


Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while(True) :
      | ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){

int a,b,ans;
char op;

cin>>a>>op>>b;

if(op == "?"){
}else{ans = a&op&b;}

cout<<ans<<endl;
return 0;

}


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

#include<iostream>
using namespace std;

int main(){

int a,b,ans;
char op;

cin>>a>>op>>b;

if(op == '?'){
}else{
ans = a op b;
cout<<ans<<endl;
}
return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: expected ';' before 'op'
   13 | ans = a op b;
      |        ^~~
      |        ;
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before '=' token
    8 |     while(op!=='?'){
      |               ^
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:9:19: error: expected primary-expression before '?' token
    9 |         if (op == ?) break;
      |                   ^
a.cc:9:20: error: expected primary-expression before ')' token
    9 |         if (op == ?) break;
      |                    ^
a.cc:9:20: error: expected ':' before ')' token
    9 |         if (op == ?) break;
      |                    ^
      |                    :
a.cc:9:20: error: expected primary-expression before ')' token
a.cc:10:18: error: expected ';' before 'op'
   10 |         cout << a op b << endl;
      |                  ^~~
      |                  ;
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:10:18: error: expected ';' before 'op'
   10 |         cout << a op b << endl;
      |                  ^~~
      |                  ;
Language: C++

int main(){

        int a, b;
        char op;

        while(true){

        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;}

        }

}



Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope
    8 |         cin >> a >> op >> b;
      |         ^~~
a.cc:10:23: error: 'cout' was not declared in this scope
   10 |         if(op == '+'){cout << a + b << endl;}
      |                       ^~~~
a.cc:10:40: error: 'endl' was not declared in this scope
   10 |         if(op == '+'){cout << a + b << endl;}
      |                                        ^~~~
a.cc:11:23: error: 'cout' was not declared in this scope
   11 |         if(op == '-'){cout << a - b << endl;}
      |                       ^~~~
a.cc:11:40: error: 'endl' was not declared in this scope
   11 |         if(op == '-'){cout << a - b << endl;}
      |                                        ^~~~
a.cc:12:23: error: 'cout' was not declared in this scope
   12 |         if(op == '*'){cout << a * b << endl;}
      |                       ^~~~
a.cc:12:40: error: 'endl' was not declared in this scope
   12 |         if(op == '*'){cout << a * b << endl;}
      |                                        ^~~~
a.cc:13:23: error: 'cout' was not declared in this scope
   13 |         if(op == '/'){cout << a / b << endl;}
      |                       ^~~~
a.cc:13:40: error: 'endl' was not declared in this scope
   13 |         if(op == '/'){cout << a / b << endl;}
      |                                        ^~~~
Language: C++

#include<math.h>
#include<cstdio>
using namespace std;

int main(){

        int a, b;
        char op;

        while(true){

        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;}

        }

}




Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'cin' was not declared in this scope
   12 |         cin >> a >> op >> b;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<cstdio>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:14:23: error: 'cout' was not declared in this scope
   14 |         if(op == '+'){cout << a + b << endl;}
      |                       ^~~~
a.cc:14:23: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:40: error: 'endl' was not declared in this scope
   14 |         if(op == '+'){cout << a + b << endl;}
      |                                        ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<cstdio>
  +++ |+#include <ostream>
    3 | using namespace std;
a.cc:15:23: error: 'cout' was not declared in this scope
   15 |         if(op == '-'){cout << a - b << endl;}
      |                       ^~~~
a.cc:15:23: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:40: error: 'endl' was not declared in this scope
   15 |         if(op == '-'){cout << a - b << endl;}
      |                                        ^~~~
a.cc:15:40: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:16:23: error: 'cout' was not declared in this scope
   16 |         if(op == '*'){cout << a * b << endl;}
      |                       ^~~~
a.cc:16:23: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:40: error: 'endl' was not declared in this scope
   16 |         if(op == '*'){cout << a * b << endl;}
      |                                        ^~~~
a.cc:16:40: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:17:23: error: 'cout' was not declared in this scope
   17 |         if(op == '/'){cout << a / b << endl;}
      |                       ^~~~
a.cc:17:23: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:17:40: error: 'endl' was not declared in this scope
   17 |         if(op == '/'){cout << a / b << endl;}
      |                                        ^~~~
a.cc:17:40: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<cstdio>
using namespace std;
int main(){
    int x,y;
    char z;
    while(1){
      scanf("%d %c %d",x,z,y);
   
    
}


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

#include<cstdio>

int main(){
    int x,y;
    string z;

      scanf("%d %c %d",x,z,y);
   
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'string' was not declared in this scope; did you mean 'stdin'?
    5 |     string z;
      |     ^~~~~~
      |     stdin
a.cc:7:26: error: 'z' was not declared in this scope
    7 |       scanf("%d %c %d",x,z,y);
      |                          ^
Language: C++

#include<cstdio>
using namespace std;
int main(){
    int x,y;
    char z;
    while(1){
      scanf("%d %c %d",&x,z,&y);
    if(z=="?"){
        return 0;
    }
    else if (z=='+'){
      printf("%d\n",x+y);
 
    }
    else if (z=='-'){
      printf("%d\n",x-y);
      
    }
    else if (z=='/'){
      printf("%d\n",x/y);
      
    }
    else if (z=='*'){
      printf("%d\n",x*y);
     
    }
    
    }
return 0;
    
}


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

#include <iostream>
#include <iomanip>
vusing namespace std;
int main (){
int a, b;
double af, bf;
cin >> a >> b;
af = a;
bf = b;
cout << setprecision(40) << a / b << " " << a % b << " " << af / bf << endl;
}



Compiler output:
a.cc:3:1: error: 'vusing' does not name a type
    3 | vusing namespace std;
      | ^~~~~~
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 >> a >> 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:10:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 | cout << setprecision(40) << a / b << " " << a % b << " " << af / bf << 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:9: error: 'setprecision' was not declared in this scope; did you mean 'std::setprecision'?
   10 | cout << setprecision(40) << a / b << " " << a % b << " " << af / bf << endl;
      |         ^~~~~~~~~~~~
      |         std::setprecision
In file included from a.cc:2:
/usr/include/c++/14/iomanip:202:3: note: 'std::setprecision' declared here
  202 |   setprecision(int __n)
      |   ^~~~~~~~~~~~
a.cc:10:72: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 | cout << setprecision(40) << a / b << " " << a % b << " " << af / bf << 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)
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main (){
	string op;
	int a, b;
	op = "+"
	while (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;
		}
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected ';' before 'while'
    6 |         op = "+"
      |                 ^
      |                 ;
    7 |         while (op != ?){
      |         ~~~~~
Language: C++

#include <iostream>
using namespace std;
int main (){
	string op;
	int a, b;
	op = "+";
	while (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;
		}
	}
}


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

#include <stdio.h>

int main(void)
{
    int a[1000];
    int b[1000];
    char op[1000];
    int i = 0;
    while(1){
        scanf("%d %c %d", &a[i], &op[i], &b[i]);
        if(op[i] != '?') break;
        i++;
    }
    i = 0;
    while(1){
        if(op != '?') break;
        switch(op[i]){
            case '+': printf("%d\n", a[i]+b[i]); break;
            case '-': printf("%d\n", a[i]-b[i]); break;
            case '*': printf("%d\n", a[i]*b[i]); break;
            case '/': printf("%d\n", a[i]/b[i]); break;
        }
        i++;
    }
    return (0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |         if(op != '?') break;
      |            ~~~^~~~~~
Language: C++

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

int main(){
int x,y,a;
string g;
for(){
cin>>x>>g>>y;
if else(g=="+"){a=x+y;}
if else(g=="-"){a=x-y;}
if else(g=="*"){a=x*y;}
if else(g=="/"){a=x/y;}
if else(g=="?"){break;}
cout<<a<<endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected primary-expression before ')' token
    7 | for(){
      |     ^
a.cc:16:1: error: expected primary-expression before 'return'
   16 | return 0;
      | ^~~~~~
a.cc:15:2: error: expected ';' before 'return'
   15 | }
      |  ^
      |  ;
   16 | return 0;
      | ~~~~~~
a.cc:16:1: error: expected primary-expression before 'return'
   16 | return 0;
      | ^~~~~~
a.cc:15:2: error: expected ')' before 'return'
   15 | }
      |  ^
      |  )
   16 | return 0;
      | ~~~~~~
a.cc:7:4: note: to match this '('
    7 | for(){
      |    ^
Language: C++

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

int main(){
int x,y,a;
string g;
for(;;){
cin>>x>>g>>y;
if else(g=="+"){a=x+y;}
if else(g=="-"){a=x-y;}
if else(g=="*"){a=x*y;}
if else(g=="/"){a=x/y;}
if else(g=="?"){break;}
cout<<a<<endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:4: error: expected '(' before 'else'
    9 | if else(g=="+"){a=x+y;}
      |    ^~~~
      |    (
a.cc:10:4: error: expected '(' before 'else'
   10 | if else(g=="-"){a=x-y;}
      |    ^~~~
      |    (
a.cc:11:4: error: expected '(' before 'else'
   11 | if else(g=="*"){a=x*y;}
      |    ^~~~
      |    (
a.cc:12:4: error: expected '(' before 'else'
   12 | if else(g=="/"){a=x/y;}
      |    ^~~~
      |    (
a.cc:13:4: error: expected '(' before 'else'
   13 | if else(g=="?"){break;}
      |    ^~~~
      |    (
Language: C++

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

int main(){
int x,y,a;
string g;
for(;;){
cin>>x>>g>>y;
if(g=="+"){a=x+y;}
if else(g=="-"){a=x-y;}
if else(g=="*"){a=x*y;}
if else(g=="/"){a=x/y;}
if else(g=="?"){break;}
cout<<a<<endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:4: error: expected '(' before 'else'
   10 | if else(g=="-"){a=x-y;}
      |    ^~~~
      |    (
a.cc:11:4: error: expected '(' before 'else'
   11 | if else(g=="*"){a=x*y;}
      |    ^~~~
      |    (
a.cc:12:4: error: expected '(' before 'else'
   12 | if else(g=="/"){a=x/y;}
      |    ^~~~
      |    (
a.cc:13:4: error: expected '(' before 'else'
   13 | if else(g=="?"){break;}
      |    ^~~~
      |    (
Language: C++

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

int main(){
int x,y,a;
string g;
for( ; ; ){
cin>>x>>g>>y;
if(g=="+"){a=x+y;}
if else(g=="-"){a=x-y;}
if else(g=="*"){a=x*y;}
if else(g=="/"){a=x/y;}
if else(g=="?"){break;}
cout<<a<<endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:4: error: expected '(' before 'else'
   10 | if else(g=="-"){a=x-y;}
      |    ^~~~
      |    (
a.cc:11:4: error: expected '(' before 'else'
   11 | if else(g=="*"){a=x*y;}
      |    ^~~~
      |    (
a.cc:12:4: error: expected '(' before 'else'
   12 | if else(g=="/"){a=x/y;}
      |    ^~~~
      |    (
a.cc:13:4: error: expected '(' before 'else'
   13 | if else(g=="?"){break;}
      |    ^~~~
      |    (
Language: 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 ( ans == "+") ant = a+b;
       if ( ans == "-") ant=a-b;
       if ( ans == "*") ant = a*b;
       if ( ans == "/") ant = a/b;

       cout << ans <<endl;

       }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |        if ( ans == "+") ant = a+b;
      |             ~~~~^~~~~~
a.cc:14:25: error: 'ant' was not declared in this scope; did you mean 'ans'?
   14 |        if ( ans == "+") ant = a+b;
      |                         ^~~
      |                         ans
a.cc:15:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |        if ( ans == "-") ant=a-b;
      |             ~~~~^~~~~~
a.cc:15:25: error: 'ant' was not declared in this scope; did you mean 'ans'?
   15 |        if ( ans == "-") ant=a-b;
      |                         ^~~
      |                         ans
a.cc:16:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |        if ( ans == "*") ant = a*b;
      |             ~~~~^~~~~~
a.cc:16:25: error: 'ant' was not declared in this scope; did you mean 'ans'?
   16 |        if ( ans == "*") ant = a*b;
      |                         ^~~
      |                         ans
a.cc:17:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |        if ( ans == "/") ant = a/b;
      |             ~~~~^~~~~~
a.cc:17:25: error: 'ant' was not declared in this scope; did you mean 'ans'?
   17 |        if ( ans == "/") ant = a/b;
      |                         ^~~
      |                         ans
Language: 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 == "+") ant = a+b;
       if ( op == "-") ant=a-b;
       if ( op == "*") ant = a*b;
       if ( op == "/") ant = a/b;

       cout << ans <<endl;

       }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: 'ant' was not declared in this scope; did you mean 'ans'?
   14 |        if ( op == "+") ant = a+b;
      |                        ^~~
      |                        ans
a.cc:15:24: error: 'ant' was not declared in this scope; did you mean 'ans'?
   15 |        if ( op == "-") ant=a-b;
      |                        ^~~
      |                        ans
a.cc:16:24: error: 'ant' was not declared in this scope; did you mean 'ans'?
   16 |        if ( op == "*") ant = a*b;
      |                        ^~~
      |                        ans
a.cc:17:24: error: 'ant' was not declared in this scope; did you mean 'ans'?
   17 |        if ( op == "/") ant = a/b;
      |                        ^~~
      |                        ans
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    while(1){
     int a,b;
     string op;
     cin>>a>>op>>b;
     if(op=="?")bbreak;
     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:8:17: error: 'bbreak' was not declared in this scope
    8 |      if(op=="?")bbreak;
      |                 ^~~~~~
Language: 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;
     cout<<ans<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected ';' before ':' token
    8 |      if(op=="?") break:
      |                       ^
      |                       ;
a.cc:8:23: error: expected primary-expression before ':' token
a.cc:10:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |      if(op=="+") ans=a+b;
      |                  ^~~
      |                  abs
a.cc:11:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |      if(op=="-") ans=a-b;
      |                  ^~~
      |                  abs
a.cc:12:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |      if(op=="*") ans=a*b;
      |                  ^~~
      |                  abs
a.cc:13:18: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |      if(op=="/") ans=a/b;
      |                  ^~~
      |                  abs
a.cc:14:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |      cout<<ans<<endl;
      |            ^~~
      |            abs
Language: C++

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

int main(){

  whlie(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: In function 'int main()':
a.cc:6:3: error: 'whlie' was not declared in this scope
    6 |   whlie(1){
      |   ^~~~~
Language: C++

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

int main(){

  whlie(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: In function 'int main()':
a.cc:6:3: error: 'whlie' was not declared in this scope
    6 |   whlie(1){
      |   ^~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
int a,b;
string op;

while(1){
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:20:10: error: expected '}' at end of input
   20 | return 0;
      |          ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
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:1: error: expected unqualified-id before 'if'
   13 | if(op == "+") ans = a + b;
      | ^~
a.cc:14:1: error: expected unqualified-id before 'if'
   14 | if(op == "-") ans = a - b;
      | ^~
a.cc:15:1: error: expected unqualified-id before 'if'
   15 | if(op == "*") ans = a * b;
      | ^~
a.cc:16:1: error: expected unqualified-id before 'if'
   16 | if(op == "/") ans = a / b;
      | ^~
a.cc:18:1: error: 'cout' does not name a type
   18 | cout<<ans<<endl;
      | ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
a.cc:20:1: error: expected unqualified-id before 'return'
   20 | return 0;
      | ^~~~~~
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^