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

#include <stdio.h>

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

	for (i = 0; 1; i++)
	{
		scanf("%d %c %d",&a,&op,&b);

		if (op == ?)
		{
			break;
		}

		if (op == +)
		{
			printf("%d\n",a+b);

		}else if (op == -)
		{
			printf("%d\n",a-b);

		}else if (op == /)
		{
			printf("%d\n",a/b);
		}else if (op == *)
		{
			printf("%d\n",a*b);
		}
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:27: error: expected expression before '?' token
   13 |                 if (op == ?)
      |                           ^
main.c:18:28: error: expected expression before ')' token
   18 |                 if (op == +)
      |                            ^
main.c:22:34: error: expected expression before ')' token
   22 |                 }else if (op == -)
      |                                  ^
main.c:26:33: error: expected expression before '/' token
   26 |                 }else if (op == /)
      |                                 ^
main.c:29:34: error: expected expression before ')' token
   29 |                 }else if (op == *)
      |                                  ^
Language: C

#include <stdio.h>

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

	for (i = 0; 1; i++)
	{
		scanf("%d %c %d",&a,&op,&b);

		if (op == \?)
		{
			break;
		}

		if (op == \+)
		{
			printf("%d\n",a+b);

		}else if (op == \-)
		{
			printf("%d\n",a-b);

		}else if (op == \/)
		{
			printf("%d\n",a/b);
		}else if (op == \*)
		{
			printf("%d\n",a*b);
		}
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:27: error: stray '\' in program
   13 |                 if (op == \?)
      |                           ^
main.c:13:28: error: expected expression before '?' token
   13 |                 if (op == \?)
      |                            ^
main.c:18:27: error: stray '\' in program
   18 |                 if (op == \+)
      |                           ^
main.c:18:29: error: expected expression before ')' token
   18 |                 if (op == \+)
      |                             ^
main.c:22:33: error: stray '\' in program
   22 |                 }else if (op == \-)
      |                                 ^
main.c:22:35: error: expected expression before ')' token
   22 |                 }else if (op == \-)
      |                                   ^
main.c:26:33: error: stray '\' in program
   26 |                 }else if (op == \/)
      |                                 ^
main.c:26:34: error: expected expression before '/' token
   26 |                 }else if (op == \/)
      |                                  ^
main.c:29:33: error: stray '\' in program
   29 |                 }else if (op == \*)
      |                                 ^
main.c:29:35: error: expected expression before ')' token
   29 |                 }else if (op == \*)
      |                                   ^
Language: C

#include<stdio.h>

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

   while (1) {

      scanf("%d%c%d",&a,&op,&b);
      
     if (op=='?') {
        break;
     }
      swtich (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;
      }
   }

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:7: error: implicit declaration of function 'swtich' [-Wimplicit-function-declaration]
   14 |       swtich (op) {
      |       ^~~~~~
main.c:14:18: error: expected ';' before '{' token
   14 |       swtich (op) {
      |                  ^~
      |                  ;
Language: C

#include<stdio.h>

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

   while (1) {

      scanf("%d %c %d",&a,&op,&b);
      
     if (op=='?') {
        break;
     }
      swtich (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;
      }
   }

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:7: error: implicit declaration of function 'swtich' [-Wimplicit-function-declaration]
   14 |       swtich (op) {
      |       ^~~~~~
main.c:14:18: error: expected ';' before '{' token
   14 |       swtich (op) {
      |                  ^~
      |                  ;
Language: C

#include<stdio.h>

int main(void){
	
	int a,b,op;
	int answer;	

	while(1){
		scanf("%d %c %d",&a,&op,&b);

		if(op==+)answer=a+b;
		if(op==-)answer=a-b;
		if(op==*)answer=a*b;
		if(op==/)answer=a/b;
	
		IF(OP==?)break;
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:25: error: expected expression before ')' token
   11 |                 if(op==+)answer=a+b;
      |                         ^
main.c:12:25: error: expected expression before ')' token
   12 |                 if(op==-)answer=a-b;
      |                         ^
main.c:13:25: error: expected expression before ')' token
   13 |                 if(op==*)answer=a*b;
      |                         ^
main.c:14:24: error: expected expression before '/' token
   14 |                 if(op==/)answer=a/b;
      |                        ^
main.c:16:17: error: implicit declaration of function 'IF' [-Wimplicit-function-declaration]
   16 |                 IF(OP==?)break;
      |                 ^~
main.c:16:20: error: 'OP' undeclared (first use in this function); did you mean 'op'?
   16 |                 IF(OP==?)break;
      |                    ^~
      |                    op
main.c:16:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:24: error: expected expression before '?' token
   16 |                 IF(OP==?)break;
      |                        ^
Language: C

#include<stdio.h>

int main(void){
	
	int a,b,op;
	int answer;	

	while(1){
		scanf("%d %c %d",&a,&op,&b);

		if(op==+)answer=a+b;
		if(op==-)answer=a-b;
		if(op==*)answer=a*b;
		if(op==/)answer=a/b;
	
		if(op==?)break;
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:25: error: expected expression before ')' token
   11 |                 if(op==+)answer=a+b;
      |                         ^
main.c:12:25: error: expected expression before ')' token
   12 |                 if(op==-)answer=a-b;
      |                         ^
main.c:13:25: error: expected expression before ')' token
   13 |                 if(op==*)answer=a*b;
      |                         ^
main.c:14:24: error: expected expression before '/' token
   14 |                 if(op==/)answer=a/b;
      |                        ^
main.c:16:24: error: expected expression before '?' token
   16 |                 if(op==?)break;
      |                        ^
Language: C

#include <stdio.h>
#include <math.h>
int main(void)
{
	int a,b,x;
	char op;
	while(1){
		scanf("%d %c %d",&a,&op,&b);
		if(op=="?") break;
		if(op=="+")
			x=a+b;
		elseif(op=="-")
			x=a-b;
		elseif(op=="*")
			x=a*b;
		else(op=="/")
			x=a/b;
		printf("%d\n",x);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:22: warning: comparison between pointer and integer
    9 |                 if(op=="?") break;
      |                      ^~
main.c:10:22: warning: comparison between pointer and integer
   10 |                 if(op=="+")
      |                      ^~
main.c:12:17: error: implicit declaration of function 'elseif' [-Wimplicit-function-declaration]
   12 |                 elseif(op=="-")
      |                 ^~~~~~
main.c:12:26: warning: comparison between pointer and integer
   12 |                 elseif(op=="-")
      |                          ^~
main.c:12:32: error: expected ';' before 'x'
   12 |                 elseif(op=="-")
      |                                ^
      |                                ;
   13 |                         x=a-b;
      |                         ~       
main.c:14:26: warning: comparison between pointer and integer
   14 |                 elseif(op=="*")
      |                          ^~
main.c:14:32: error: expected ';' before 'x'
   14 |                 elseif(op=="*")
      |                                ^
      |                                ;
   15 |                         x=a*b;
      |                         ~       
main.c:16:17: error: 'else' without a previous 'if'
   16 |                 else(op=="/")
      |                 ^~~~
main.c:16:24: warning: comparison between pointer and integer
   16 |                 else(op=="/")
      |                        ^~
main.c:16:30: error: expected ';' before 'x'
   16 |                 else(op=="/")
      |                              ^
      |                              ;
   17 |                         x=a/b;
      |                         ~
Language: C

#include <stdio.h>
#include <math.h>
int main(void)
{
	int a,b,x;
	char op;
	while(1){
		scanf("%d %c %d",&a,&op,&b);
		if(op=="?") break;
		if(op=="+")
			x=a+b;
		else if(op=="-")
			x=a-b;
		else if(op=="*")
			x=a*b;
		else(op=="/")
			x=a/b;
		printf("%d\n",x);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:22: warning: comparison between pointer and integer
    9 |                 if(op=="?") break;
      |                      ^~
main.c:10:22: warning: comparison between pointer and integer
   10 |                 if(op=="+")
      |                      ^~
main.c:12:27: warning: comparison between pointer and integer
   12 |                 else if(op=="-")
      |                           ^~
main.c:14:27: warning: comparison between pointer and integer
   14 |                 else if(op=="*")
      |                           ^~
main.c:16:24: warning: comparison between pointer and integer
   16 |                 else(op=="/")
      |                        ^~
main.c:16:30: error: expected ';' before 'x'
   16 |                 else(op=="/")
      |                              ^
      |                              ;
   17 |                         x=a/b;
      |                         ~
Language: C

#include <stdio.h>

int main(void){

int a[100], b[100], op[100];

i=0;
while(op != ?){
scanf("%d %d %d", &a[i], &op[i], &b[i]);
i++;
}

for(j=0; j<i-1;j++){
switch(op[j]){
case +:
printf("%d\n",a[j]+b[j]);
break;
case -:
printf("%d\n", a[j]-b[j]);
break;
case /:
printf("%d\n", a[j]/b[j]);
break;
default:
printf("%d\n", a[j]*b[j])
break;
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:1: error: 'i' undeclared (first use in this function)
    7 | i=0;
      | ^
main.c:7:1: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:13: error: expected expression before '?' token
    8 | while(op != ?){
      |             ^
main.c:13:5: error: 'j' undeclared (first use in this function)
   13 | for(j=0; j<i-1;j++){
      |     ^
main.c:15:7: error: expected expression before ':' token
   15 | case +:
      |       ^
main.c:18:7: error: expected expression before ':' token
   18 | case -:
      |       ^
main.c:21:6: error: expected expression before '/' token
   21 | case /:
      |      ^
main.c:21:6: error: expected expression before '/' token
main.c:25:26: error: expected ';' before 'break'
   25 | printf("%d\n", a[j]*b[j])
      |                          ^
      |                          ;
   26 | break;
      | ~~~~~
Language: C

#include <stdio.h>

int main(void){

int a[100], b[100], op[100];
int i, j;

i=0;
while(op != ?){
scanf("%d %d %d", &a[i], &op[i], &b[i]);
i++;
}

for(j=0; j<i-1;j++){
switch(op[j]){
case +:
printf("%d\n",a[j]+b[j]);
break;
case -:
printf("%d\n", a[j]-b[j]);
break;
case /:
printf("%d\n", a[j]/b[j]);
break;
default:
printf("%d\n", a[j]*b[j])
break;
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:13: error: expected expression before '?' token
    9 | while(op != ?){
      |             ^
main.c:16:7: error: expected expression before ':' token
   16 | case +:
      |       ^
main.c:19:7: error: expected expression before ':' token
   19 | case -:
      |       ^
main.c:22:6: error: expected expression before '/' token
   22 | case /:
      |      ^
main.c:22:6: error: expected expression before '/' token
main.c:26:26: error: expected ';' before 'break'
   26 | printf("%d\n", a[j]*b[j])
      |                          ^
      |                          ;
   27 | break;
      | ~~~~~
Language: C

#include <stdio.h>

int main(void){

int a[100], b[100];
char op[100];
int i, j;

i=0;
while(op != "?"){
scanf("%d %c %d", &a[i], &op[i], &b[i]);
i++;
}

for(j=0; j<i-1;j++){
switch(op[j]){
case "+":
printf("%d\n",a[j]+b[j]);
break;
case "-":
printf("%d\n", a[j]-b[j]);
break;
case "/":
printf("%d\n", a[j]/b[j]);
break;
default:
printf("%d\n", a[j]*b[j])
break;
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:1: error: pointers are not permitted as case values
   17 | case "+":
      | ^~~~
main.c:20:1: error: pointers are not permitted as case values
   20 | case "-":
      | ^~~~
main.c:23:1: error: pointers are not permitted as case values
   23 | case "/":
      | ^~~~
main.c:27:26: error: expected ';' before 'break'
   27 | printf("%d\n", a[j]*b[j])
      |                          ^
      |                          ;
   28 | break;
      | ~~~~~
Language: C

#include <stdio.h>

int main(void){

int a[100], b[100];
char op[100];
int i, j;

i=0;
while(op != '?'){
scanf("%d %c %d", &a[i], &op[i], &b[i]);
i++;
}

for(j=0; j<i-1;j++){
switch(op[j]){
case '+':
printf("%d\n",a[j]+b[j]);
break;
case '-':
printf("%d\n", a[j]-b[j]);
break;
case '/':
printf("%d\n", a[j]/b[j]);
break;
default:
printf("%d\n", a[j]*b[j])
break;
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:10: warning: comparison between pointer and integer
   10 | while(op != '?'){
      |          ^~
main.c:27:26: error: expected ';' before 'break'
   27 | printf("%d\n", a[j]*b[j])
      |                          ^
      |                          ;
   28 | break;
      | ~~~~~
Language: C

#include <stdio.h>

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

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:27: error: expected ';' before 'break'
   17 |         } else (op == '?') break
      |                           ^~~~~~
      |                           ;
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:18:35: error: expected ';' before 'break'
   18 |                 } else (op == '?') break;
      |                                   ^~~~~~
      |                                   ;
Language: C

#include <stdio.h>

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

	while(1){
		scanf("%d%c%d", &a, &op, &b);
		else if(op == '+')
			printf("%d\n", a+b);
		else if(op == '-')
			printf("%d\n", a-b);
		else if(op == '*')
			printf("%d\n", a*b);
		else if(op == '/')
			printf("%d\n", a/b);
		else
			break;
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:17: error: 'else' without a previous 'if'
    9 |                 else if(op == '+')
      |                 ^~~~
Language: C

#include <stdio.h>

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

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

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:32: error: expected ';' before 'printf'
   15 |                 else(op == '/')
      |                                ^
      |                                ;
   16 |                         printf("%d\n", a/b);
      |                         ~~~~~~
Language: C

#include

#include <stdio.h>

int main(void){
  int a,b;
  char c;
  while(1){
    scanf("%d",&a);
    getchar();
    scanf("%c",&c);
    getchar();
    scanf("%d",&b);
    if(c == '?')
      break;
    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;
    }
  }
  return 0;
}

Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include
      |         ^
Language: C

#include

#include <stdio.h>

int main(void){
  int a,b;
  char c,trash;
  while(1){
    scanf("%d",&a);
    trash = getchar();
    scanf("%c",&c);
    getchar();
    trash = scanf("%d",&b);
    if(c == '?')
      break;
    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;
    }
  }
  return 0;
}

Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include
      |         ^
Language: C

#include<stdio,h>
int main(){
char op;
int a[20000];
int b[20000];
int i,j;

for(i=0; i<20000; i++){
 scanf("%d%d%s", &a[i], &b[i], &op);

if(op == ?)
 break;
}

for(j=0; j<i; j++){
 printf("%d%s%d\n", a[j], op, b[j]);

return 0;

}



 

Compiler output:
main.c:1:9: fatal error: stdio,h: No such file or directory
    1 | #include<stdio,h>
      |         ^~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main(){
char op;
int a[20000];
int b[20000];
int i,j;

for(i=0; i<20000; i++){
 scanf("%d%d%s", &a[i], &b[i], &op);

if(op == ?)
 break;
}

for(j=0; j<i; j++){
 printf("%d%s%d\n", a[j], op, b[j]);

return 0;

}



 

Compiler output:
main.c: In function 'main':
main.c:11:10: error: expected expression before '?' token
   11 | if(op == ?)
      |          ^
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
Language: C

#include<stdio.h>
int main(){
char op;
int a[20000];
int b[20000];
int i,j;

for(i=0; i<20000; i++){
 scanf("%d%d%s", &a[i], &b[i], &op);

if(op == ?)
 break;
}

for(j=0; j<i; j++){
 printf("%d%s%d\n", a[j], op, b[j]);

return 0;
}

}



 

Compiler output:
main.c: In function 'main':
main.c:11:10: error: expected expression before '?' token
   11 | if(op == ?)
      |          ^
Language: C

#include<stdio.h>
int main(){
char op;
int a[20000];
int b[20000];
int i,j;

for(i=0; i<20000; i++){
 scanf("%d%d%s", &a[i], &b[i], op);

if(op == ?)
 break;
}

for(j=0; j<i; j++){
 printf("%d%s%d\n", a[j], op, b[j]);

return 0;
}

}



 

Compiler output:
main.c: In function 'main':
main.c:11:10: error: expected expression before '?' token
   11 | if(op == ?)
      |          ^
Language: C

#include<stdio.h>
int main(){
int a,b,op;

while(1){
 scanf("%d%d%c", &a, &op, &b);

 if(op == '+'){
   printf("%d", a+b);

}else if(op == '-'){
   printf("%d", a-b);

}else if(op == '*'){
   printf("%d", a*b);

}else if(op == '/'){
   printf("%d", a/b);

}else
  break;
}
}

return 0;

}

 

Compiler output:
main.c:25:1: error: expected identifier or '(' before 'return'
   25 | return 0;
      | ^~~~~~
main.c:27:1: error: expected identifier or '(' before '}' token
   27 | }
      | ^
Language: C

#include <stdio.h>
#include <math.h>
int main(void)
{
    double a,b,x;
    scanf("%d,%c,%d",&a,&op,&b);

    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;
        
        default:
        break;
    }


    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:26: error: 'op' undeclared (first use in this function)
    6 |     scanf("%d,%c,%d",&a,&op,&b);
      |                          ^~
main.c:6:26: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <math.h>
int main(void)
{
    int a,b,x;
    char op;
    scanf("%d,%c,%d",&a,&op,&b);

    if ( op == '+' ){
        x = a+b;
        printf("%d\n",x);
    } else if ( op == '-' ){
        x = a-b;
        printf("%d\n",x);        
    } else if ( op == '*' ){
        x = a*b;
        printf("%d\n",x);
    } else if ( op == '/' ){
        x = a/b;
        printf("%d\n",x);
    } else {
        break;
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:9: error: break statement not within loop or switch
   22 |         break;
      |         ^~~~~
Language: C

#include <stdio.h>

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

  while(scanf("%d%s%d", &a, &op, &b)){
    switch(op){
      case "?":
        break;
      case "+":
        printf("%d\n", a + b);
      case "-":
        printf("%d\n", a - b);
      case "*":
        printf("%d\n", a * b);
      case "/":
        printf("%d\n", a / b);
    }
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:7: error: pointers are not permitted as case values
    9 |       case "?":
      |       ^~~~
main.c:11:7: error: pointers are not permitted as case values
   11 |       case "+":
      |       ^~~~
main.c:13:7: error: pointers are not permitted as case values
   13 |       case "-":
      |       ^~~~
main.c:15:7: error: pointers are not permitted as case values
   15 |       case "*":
      |       ^~~~
main.c:17:7: error: pointers are not permitted as case values
   17 |       case "/":
      |       ^~~~
Language: C

#include <stdio.h>

int main()
{
 int x, y;
 char c;
 do {
  scanf("%d %s %d", x, c, y);
  swith(c) {
   case '+':
    printf("%d", x + y);
    break;
   case '-':
    printf("%d", x - y);
    break;
   case '*':
    printf("%d", x * y);
    break;
   case '/':
    printf("%d", x / y);
    break;
  }
 } while (c != '?');
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:3: error: implicit declaration of function 'swith' [-Wimplicit-function-declaration]
    9 |   swith(c) {
      |   ^~~~~
main.c:9:11: error: expected ';' before '{' token
    9 |   swith(c) {
      |           ^~
      |           ;
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
    int a,b,n;
    char op;
    for(;;){
    scanf("%d %c %d",&a,&op,&b);
    if(op == '+'){
        printf("%d\n",a+b);
    }
    else if(op == '-'){
        n = abs(a-b);
        printf("%d\n"n);
    }
    else if(op == '*'){
        printf("%d\n",a*b);
    }
    else if(op == '/'){
        printf("%d\n",a/b);
    }
    else
        break;

    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:13: error: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
   13 |         n = abs(a-b);
      |             ^~~
main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'abs'
    2 | #include<math.h>
  +++ |+#include <stdlib.h>
    3 | int main()
main.c:14:22: error: expected ')' before 'n'
   14 |         printf("%d\n"n);
      |               ~      ^
      |                      )
Language: C

#include<stdio.h>
int main(void)
{
int a,b;
char op;
while(1){
scanf("%d %c %d",&a ,&op ,&b);
if (op == ?)break;
else if (op == +){
printf("%d\n",+b);
}else if (op == -){
printf("%d\n",a-b);
}else if (op == *){
printf("%d\n",a*b);
}else if (op == /){
printf("%d\n"a/b);
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:11: error: expected expression before '?' token
    8 | if (op == ?)break;
      |           ^
main.c:11:18: error: expected expression before ')' token
   11 | }else if (op == -){
      |                  ^
main.c:13:18: error: expected expression before ')' token
   13 | }else if (op == *){
      |                  ^
main.c:15:17: error: expected expression before '/' token
   15 | }else if (op == /){
      |                 ^
main.c:16:14: error: expected ')' before 'a'
   16 | printf("%d\n"a/b);
      |       ~      ^
      |              )
Language: C

#include<stdio.h>
int main(void)
{
int a,b;
char op;
while(1){
scanf("%d %c %d",&a ,&op ,&b);
if (op == '?')break;
else if (op == '+'){
printf("%d\n",a+b);
}else if (op == '-'){
printf("%d\n",a-b);
}else if (op == '*'){
printf("%d\n",a*b);
}else if (op == '/'){
printf("%d\n"a/b);
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:14: error: expected ')' before 'a'
   16 | printf("%d\n"a/b);
      |       ~      ^
      |              )
Language: C

#include<stdio.h>
int main(void){
	int a, b,k;
	char op='a';
	while (op != '?'){
		a = 0;
		b = 0;
		k = 0;
		op = 'a';
		scanf_s("%d", &a);
		scanf_s("%c", &op);
		scanf_s("%d", &b);
		if (op == '+'){
			k = a+b;
		}
		else if (op == '-') {
			k = a-b;
		}
		else if (op == '*'){
			k = a*b;
		}
		else if (op == '/'){
			k = a/b;
		}
		printf("%d\n", k);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   10 |                 scanf_s("%d", &a);
      |                 ^~~~~~~
      |                 scanf
Language: C

#include <stdio.h>

int main(void)
{
  int a = 0;
  int op;
  int b = 0;

  do {
  scanf("%d %c %d", &a, &op, &b);

  if (op == '?')
    break;;
  
  printf("%d\n", a op b,);

  } while(1);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:19: error: expected ')' before 'op'
   15 |   printf("%d\n", a op b,);
      |         ~         ^~~
      |                   )
Language: C

#include <stdio.h>

int main(void)
{
  int a = 0;
  int op;
  int b = 0;

  do {
  scanf("%d %c %d", &a, &op, &b);

  if (op == '?')
    break;
  if ( op == '+')
  printf("%d\n", a + b,);

  if ( op == '-')
  printf("%d\n", a - b,);

  if ( op == '*')
  printf("%d\n", a * b,);

  if ( op == '/')
  printf("%d\n", a / b,);

  } while(1);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:24: error: expected expression before ')' token
   15 |   printf("%d\n", a + b,);
      |                        ^
main.c:18:24: error: expected expression before ')' token
   18 |   printf("%d\n", a - b,);
      |                        ^
main.c:21:24: error: expected expression before ')' token
   21 |   printf("%d\n", a * b,);
      |                        ^
main.c:24:24: error: expected expression before ')' token
   24 |   printf("%d\n", a / b,);
      |                        ^
Language: C

#include<stdio.h>
int main(void){
	int a,b;
	char op;
	scanf("%d %c %d",a,op,b);
	while(1){
		if(op == '+'){
			printf("%d\n",a + b);
		}
		if(op == '-'){
			printf("%d\n",a - b);
		}
		if(op == '*'){
			printf("%d\n",a * b);
		}
		if(op == '/'){
			printf("%d\n",a / b);
		}
		if(op == '?'){
			break;
		}
	}
	return 0
}

Compiler output:
main.c: In function 'main':
main.c:23:17: error: expected ';' before '}' token
   23 |         return 0
      |                 ^
      |                 ;
   24 | }
      | ~
Language: C

#include<stdio.h>

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

    while(1){
        scanf("%d %c %d",&a,&c,&b);
        if(c == '?')
            break;
        else if(c == '+')
            ans = a + b;
        else if(c == '-')
            ans = a - b;
        else if(c == '*')
            ans = a * b;
        else
            ans = a / b;
        printf("%d\n",ans);
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:30: error: 'c' undeclared (first use in this function)
    8 |         scanf("%d %c %d",&a,&c,&b);
      |                              ^
main.c:8:30: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main()
      | ^~~~
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%d %c %d", &a, &op, &b);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main()
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d %c %d", &a, &op, &b);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:2: error: expected expression before '?' token
    9 |  ??? switch(op){
      |  ^
Language: C

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

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main()
      | ^~~~
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%d %c %d", &a, &op, &b);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main()
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d %c %d", &a, &op, &b);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:9:2: error: expected expression before '?' token
    9 |  ??? switch(op){
      |  ^
Language: C

main()
{
  int a, b;
  char op;
  
  scanf("%d %c %d", &a, &op, &b);
 
  while(op != '?'){

 ??? 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;
   } 
  scanf("%d %c %d", &a, &op, &b);
 }
 return 0;
}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main()
      | ^~~~
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |   scanf("%d %c %d", &a, &op, &b);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main()
main.c:6:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |   scanf("%d %c %d", &a, &op, &b);
      |   ^~~~~
main.c:6:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:2: error: expected expression before '?' token
   10 |  ??? switch(op){
      |  ^
Language: C

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

 
  while(op != '?'){
    scanf("%d %c %d", &a, &op, &b);
 ??? 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;
   } 
  scanf("%d %c %d", &a, &op, &b);
 }
 return 0;
}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main()
      | ^~~~
main.c: In function 'main':
main.c:9:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    9 |     scanf("%d %c %d", &a, &op, &b);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main()
main.c:9:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |     scanf("%d %c %d", &a, &op, &b);
      |     ^~~~~
main.c:9:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:2: error: expected expression before '?' token
   10 |  ??? switch(op){
      |  ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
	int a,b,ans;
	char op;
	scanf("%d %s %d",&a,&op,&b);
	while(1){
		if(strcmp(op,'?') == ) break;
		switch(op){
			case '+' : ans = a + b;
			break;
			case '-' : ans = a - b;
			break;
			case '*' : ans = a * b;
			break;
			case '/' : ans = a / b;
			break;
		}
		printf("%d",ans);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:27: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    8 |                 if(strcmp(op,'?') == ) break;
      |                           ^~
      |                           |
      |                           char
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:8:30: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    8 |                 if(strcmp(op,'?') == ) break;
      |                              ^~~
      |                              |
      |                              int
/usr/include/string.h:156:50: note: expected 'const char *' but argument is of type 'int'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
main.c:8:38: error: expected expression before ')' token
    8 |                 if(strcmp(op,'?') == ) break;
      |                                      ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
	int a,b,ans;
	char op;
	scanf("%d %s %d",&a,&op,&b);
	while(1){
		if(strcmp(op,"?") == ) break;
		switch(op){
			case '+' : ans = a + b;
			break;
			case '-' : ans = a - b;
			break;
			case '*' : ans = a * b;
			break;
			case '/' : ans = a / b;
			break;
		}
		printf("%d\n",ans);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:27: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    8 |                 if(strcmp(op,"?") == ) break;
      |                           ^~
      |                           |
      |                           char
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:8:38: error: expected expression before ')' token
    8 |                 if(strcmp(op,"?") == ) break;
      |                                      ^
Language: C

#include <stdio.h>
#include <string.h.>
int main(){
	int a,b;
	char op[10];
	char tasu[10] = "+";
	char hiku[10] = "-";
	char kake[10] = "*";
	char waru[10] = "/";

	while(1){
		scanf("%d",&a);
		scanf("%s",op);
		scanf("%d",&b);
		if(strcmp(tasu,op) == 0){
			printf("%d\n",a + b);
		}else if(strcmp(hiku,op) == 0){
			printf("%d\n",a - b);
		}else if(strcmp(kake,op) == 0){
			printf("%d\n",a * b);
		}else if(strcmp(waru,op) == 0){
			printf("%d\n",a / b);
		}else {
			break;
		}
	}
	return 0;
}

Compiler output:
main.c:2:10: fatal error: string.h.: No such file or directory
    2 | #include <string.h.>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>

int calculator(int number_1,char enzanshi,int number_2){
	int sonuc;
	switch(enzanshi){
	case '+':
		sonuc=number_1+number_2;
		break;
	case '-':
		sonuc=number_1-number_2;
		break;
	case '*':
		sonuc=number_1*number_2;
		break;
	case '/':
		sonuc=number_1/number_2;
		break;
	}
return sonuc;

}


int main(){
	int number_1,number_2,sonuc;
	char enzanshi;
	scanf("%d %c %d",&number_1,&enzanshi,&number_2);
	if(enzanshi!='?'){
	sonuc=calculator(number_1,enzanshi,number_2);
	printf("%d",sonuc\n);
	}
	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:30:26: error: stray '\' in program
   30 |         printf("%d",sonuc\n);
      |                          ^
main.c:30:26: error: expected ')' before 'n'
   30 |         printf("%d",sonuc\n);
      |               ~          ^~
      |                          )
Language: C

#include<stdio.h>

int main(){
  int a,b;
  char e[];
  scanf("%d%s%d",&a,e,&b);
  if(e=='+') printf("%d\n",a+b); 
  if(e=='-') printf("%d\n",a-b); 
  if(e=='*') printf("%d\n",a*b); 
  if(e=='/') printf("%d\n",a/b); 
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:5:8: error: array size missing in 'e'
    5 |   char e[];
      |        ^
main.c:7:7: warning: comparison between pointer and integer
    7 |   if(e=='+') printf("%d\n",a+b);
      |       ^~
main.c:8:7: warning: comparison between pointer and integer
    8 |   if(e=='-') printf("%d\n",a-b);
      |       ^~
main.c:9:7: warning: comparison between pointer and integer
    9 |   if(e=='*') printf("%d\n",a*b);
      |       ^~
main.c:10:7: warning: comparison between pointer and integer
   10 |   if(e=='/') printf("%d\n",a/b);
      |       ^~
Language: C

#include<stdio.h>

int main(){
  int a,b;
  char e[1];
  scanf("%d%s%d",&a,e,&b);
  while(!e=='?'){
    if(e=='+') printf("%d\n",a+b); 
    if(e=='-') printf("%d\n",a-b); 
    if(e=='*') printf("%d\n",a*b); 
    if(e=='/') printf("%d\n",a/b);
    scanf("%d%s%d",&a,e,&b); 
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:8:9: warning: comparison between pointer and integer
    8 |     if(e=='+') printf("%d\n",a+b);
      |         ^~
main.c:9:9: warning: comparison between pointer and integer
    9 |     if(e=='-') printf("%d\n",a-b);
      |         ^~
main.c:10:9: warning: comparison between pointer and integer
   10 |     if(e=='*') printf("%d\n",a*b);
      |         ^~
main.c:11:9: warning: comparison between pointer and integer
   11 |     if(e=='/') printf("%d\n",a/b);
      |         ^~
main.c:13:3: error: expected declaration or statement at end of input
   13 |   return 0;}
      |   ^~~~~~
Language: C

#include<stdio.h>
#include<string.h>

int main(){
  int a,b;
  char e[1];
  scanf("%d%s%d",&a,e,&b);
  while(strcmp(e,?)){
    if(!strcmp(e,+)) printf("%d\n",a+b); 
    if(!strcmp(e,-)) printf("%d\n",a-b); 
    if(!strcmp(e,*)) printf("%d\n",a*b); 
    if(!strcmp(e,/)) printf("%d\n",a/b);
    scanf("%d%s%d",&a,e,&b);} 
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:8:18: error: expected expression before '?' token
    8 |   while(strcmp(e,?)){
      |                  ^
main.c:10:19: error: expected expression before ')' token
   10 |     if(!strcmp(e,-)) printf("%d\n",a-b);
      |                   ^
main.c:11:19: error: expected expression before ')' token
   11 |     if(!strcmp(e,*)) printf("%d\n",a*b);
      |                   ^
main.c:12:18: error: expected expression before '/' token
   12 |     if(!strcmp(e,/)) printf("%d\n",a/b);
      |                  ^
Language: C

#include<stdio.h>
#include<string.h>

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

Compiler output:
main.c: In function 'main':
main.c:8:10: error: 'e' undeclared (first use in this function)
    8 |   while(!e=='?'){
      |          ^
main.c:8:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){
 int a,b;
 char e;
 scanf("%d%c%d",&a,&e,&b);
 while(!e=='?'){
  if(e=='+'){
   printf("%d",a+b)}
  if(e=='-'){
   printf("%d",a-b)}
  if(e=='*'){
   printf("%d",a*b)}
  if(e=='/'){
   printf("%d",a/b)}
  scanf("%d%c%d",&a,&e,&b);}
 return 0;}

Compiler output:
main.c: In function 'main':
main.c:9:20: error: expected ';' before '}' token
    9 |    printf("%d",a+b)}
      |                    ^
      |                    ;
main.c:11:20: error: expected ';' before '}' token
   11 |    printf("%d",a-b)}
      |                    ^
      |                    ;
main.c:13:20: error: expected ';' before '}' token
   13 |    printf("%d",a*b)}
      |                    ^
      |                    ;
main.c:15:20: error: expected ';' before '}' token
   15 |    printf("%d",a/b)}
      |                    ^
      |                    ;
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:8:1: error: expected expression before '?' token
    8 | ???printf("%d\n",a+b;)}
      | ^
main.c:8:23: error: expected ':' before '}' token
    8 | ???printf("%d\n",a+b;)}
      |                       ^
      |                       :
main.c:10:1: error: expected expression before '?' token
   10 | ???printf("%d\n",a-b);}
      | ^
main.c:10:22: error: expected ':' before ';' token
   10 | ???printf("%d\n",a-b);}
      |                      ^
      |                      :
main.c:12:1: error: expected expression before '?' token
   12 | ???printf("%d\n",a*b);}
      | ^
main.c:12:22: error: expected ':' before ';' token
   12 | ???printf("%d\n",a*b);}
      |                      ^
      |                      :
main.c:14:1: error: expected expression before '?' token
   14 | ???printf("%d\n",a/b);}
      | ^
main.c:14:22: error: expected ':' before ';' token
   14 | ???printf("%d\n",a/b);}
      |                      ^
      |                      :
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:8:1: error: expected expression before '?' token
    8 | ???printf("%d\n",a+b;);}
      | ^
main.c:8:23: error: expected ':' before ';' token
    8 | ???printf("%d\n",a+b;);}
      |                       ^
      |                       :
main.c:10:1: error: expected expression before '?' token
   10 | ???printf("%d\n",a-b);}
      | ^
main.c:10:22: error: expected ':' before ';' token
   10 | ???printf("%d\n",a-b);}
      |                      ^
      |                      :
main.c:12:1: error: expected expression before '?' token
   12 | ???printf("%d\n",a*b);}
      | ^
main.c:12:22: error: expected ':' before ';' token
   12 | ???printf("%d\n",a*b);}
      |                      ^
      |                      :
main.c:14:1: error: expected expression before '?' token
   14 | ???printf("%d\n",a/b);}
      | ^
main.c:14:22: error: expected ':' before ';' token
   14 | ???printf("%d\n",a/b);}
      |                      ^
      |                      :
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:8:1: error: expected expression before '?' token
    8 | ???printf("%d\n",a+b);}
      | ^
main.c:8:22: error: expected ':' before ';' token
    8 | ???printf("%d\n",a+b);}
      |                      ^
      |                      :
main.c:10:1: error: expected expression before '?' token
   10 | ???printf("%d\n",a-b);}
      | ^
main.c:10:22: error: expected ':' before ';' token
   10 | ???printf("%d\n",a-b);}
      |                      ^
      |                      :
main.c:12:1: error: expected expression before '?' token
   12 | ???printf("%d\n",a*b);}
      | ^
main.c:12:22: error: expected ':' before ';' token
   12 | ???printf("%d\n",a*b);}
      |                      ^
      |                      :
main.c:14:1: error: expected expression before '?' token
   14 | ???printf("%d\n",a/b);}
      | ^
main.c:14:22: error: expected ':' before ';' token
   14 | ???printf("%d\n",a/b);}
      |                      ^
      |                      :
Language: C

#include <stdio.h>

int main(){

    int a,b;
    char op;

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

}

Compiler output:
main.c: In function 'main':
main.c:19:9: error: break statement not within loop or switch
   19 |         break;
      |         ^~~~~
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:12:4: error: expected ':' or '...' before 'break'
   12 |    break;
      |    ^~~~~
main.c:14:4: error: expected ':' or '...' before 'sum'
   14 |    sum = a+ b;
      |    ^~~
main.c:16:4: error: expected ':' or '...' before 'sum'
   16 |    sum = a - b;
      |    ^~~
main.c:18:4: error: expected ':' or '...' before 'sum'
   18 |    sum = a* b;
      |    ^~~
main.c:20:4: error: expected ':' or '...' before 'sum'
   20 |    sum= a / b;
      |    ^~~
Language: C

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:12:4: error: expected ':' or '...' before 'return'
   12 |    return 0;
      |    ^~~~~~
main.c:14:4: error: expected ':' or '...' before 'sum'
   14 |    sum = a+ b;
      |    ^~~
main.c:17:4: error: expected ':' or '...' before 'sum'
   17 |    sum = a - b;
      |    ^~~
main.c:20:4: error: expected ':' or '...' before 'sum'
   20 |    sum = a* b;
      |    ^~~
main.c:23:4: error: expected ':' or '...' before 'sum'
   23 |    sum= a / b;
      |    ^~~
main.c:12:11: warning: statement will never be executed [-Wswitch-unreachable]
   12 |    return 0;
      |           ^
Language: C

#include <stdio.h>

int main()
{
 int a,b,sum;
 char x;
 while(1)
 {
  scanf("%d %c %d", &a, &x, &b);
  if(x=="+")
   sum=a+b;
  if(x=="-")
   sum=a-b;
  if(x=="*")
   sum=a*b;
  if(x=="/")
   sum=a/b;
  if(x=="?")
   return 0;
  }
  printf("%d\n", sum);
 }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:7: warning: comparison between pointer and integer
   10 |   if(x=="+")
      |       ^~
main.c:12:7: warning: comparison between pointer and integer
   12 |   if(x=="-")
      |       ^~
main.c:14:7: warning: comparison between pointer and integer
   14 |   if(x=="*")
      |       ^~
main.c:16:7: warning: comparison between pointer and integer
   16 |   if(x=="/")
      |       ^~
main.c:18:7: warning: comparison between pointer and integer
   18 |   if(x=="?")
      |       ^~
main.c: At top level:
main.c:23:2: error: expected identifier or '(' before 'return'
   23 |  return 0;
      |  ^~~~~~
main.c:24:1: error: expected identifier or '(' before '}' token
   24 | }
      | ^