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

#include<stdio.h>
int main(void)
{
	int a,b;
	char 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 if(op == '?'){
		break;
	}
	
	return 0;
}

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

#include <stdio.h>

int main()
{
	int a,b;
	char op;
	
	while(1)
	{
		scanf("%d %s %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);
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:26: error: expected expression before '?' token
   12 |                 if(op == ?){
      |                          ^
main.c:16:27: error: expected expression before ')' token
   16 |                 if(op == +)
      |                           ^
main.c:20:27: error: expected expression before ')' token
   20 |                 if(op == -)
      |                           ^
main.c:24:27: error: expected expression before ')' token
   24 |                 if(op == *)
      |                           ^
main.c:28:26: error: expected expression before '/' token
   28 |                 if(op == /)
      |                          ^
Language: C

#include <stdio.h>


int main(void)
 {

	int a, b;
	char 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("%f\n",a/b);
	} else {
???	
	}

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:12:1: error: expected expression before '?' token
   12 | ???     printf("%d\n",a+b);
      | ^
main.c:12:27: 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:27: error: expected ':' before ';' token
   14 | ???     printf("%d\n",a-b);
      |                           ^
      |                           :
main.c:16:1: error: expected expression before '?' token
   16 | ???     printf("%d\n",a*b);
      | ^
main.c:16:27: error: expected ':' before ';' token
   16 | ???     printf("%d\n",a*b);
      |                           ^
      |                           :
main.c:18:1: error: expected expression before '?' token
   18 | ???     printf("%f\n",a/b);
      | ^
main.c:18:27: error: expected ':' before ';' token
   18 | ???     printf("%f\n",a/b);
      |                           ^
      |                           :
main.c:20:1: error: expected expression before '?' token
   20 | ???
      | ^
Language: C

#include<stdio.h>
int main()
{
  int a,b;
  char op;
  while(1)
    {
      scanf("%d%c%d",&a,&op,&b);
      if(op=='?') 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: In function 'main':
main.c:10:14: error: 'c' undeclared (first use in this function)
   10 |       switch(c)
      |              ^
main.c:10:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
Language: C

#include <stdio.h>

int main()
{
  int a[100] = 0;,b[100] = 0;
  char op[100] = ' ';
  int i,j;

  for(i=0;;i++){
    scanf("%d %c %d",a[i],op[i],b[i]);
    if(op[i]=='?') break;
    else if(a<0 || a>20000 || b<0 || b>20000) return -1;
  }

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


}

Compiler output:
main.c: In function 'main':
main.c:5:16: error: invalid initializer
    5 |   int a[100] = 0;,b[100] = 0;
      |                ^
main.c:5:18: error: expected expression before ',' token
    5 |   int a[100] = 0;,b[100] = 0;
      |                  ^
main.c:5:19: error: 'b' undeclared (first use in this function)
    5 |   int a[100] = 0;,b[100] = 0;
      |                   ^
main.c:5:19: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:18: error: invalid initializer
    6 |   char op[100] = ' ';
      |                  ^~~
main.c:12:21: warning: comparison between pointer and integer
   12 |     else if(a<0 || a>20000 || b<0 || b>20000) return -1;
      |                     ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
Language: C

#include<stdio.h>

int main()
{
    int a,b;
    char op;
    while(1){
        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:12:1: error: expected expression before '?' token
   12 | ????????????            printf("%d\n",a+b);
      | ^
main.c:12:43: error: expected ':' before ';' token
   12 | ????????????            printf("%d\n",a+b);
      |                                           ^
      |                                           :
main.c:13:1: error: expected expression before '?' token
   13 | ????????        }else if(op=='-'){
      | ^
main.c:14:1: error: expected expression before '?' token
   14 | ????????????            printf("%d\n",a-b);
      | ^
main.c:14:43: error: expected ':' before ';' token
   14 | ????????????            printf("%d\n",a-b);
      |                                           ^
      |                                           :
main.c:15:1: error: expected expression before '?' token
   15 | ????????        }else if(op=='*'){
      | ^
main.c:16:1: error: expected expression before '?' token
   16 | ????????????            printf("%d\n",a*b);
      | ^
main.c:16:43: error: expected ':' before ';' token
   16 | ????????????            printf("%d\n",a*b);
      |                                           ^
      |                                           :
main.c:17:1: error: expected expression before '?' token
   17 | ????????        }else if(op=='/'){
      | ^
main.c:18:1: error: expected expression before '?' token
   18 | ????????           ??printf("%d\n",a/b);
      | ^
main.c:18:40: error: expected ':' before ';' token
   18 | ????????           ??printf("%d\n",a/b);
      |                                        ^
      |                                        :
Language: C

#include<stdio.h>

int main()
{
    int a,b;
    char op;
    while(1){
        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:12:1: error: expected expression before '?' token
   12 | ????????????        printf("%d\n",a+b);
      | ^
main.c:12:39: error: expected ':' before ';' token
   12 | ????????????        printf("%d\n",a+b);
      |                                       ^
      |                                       :
main.c:13:1: error: expected expression before '?' token
   13 | ????????        }else if(op=='-'){
      | ^
main.c:14:1: error: expected expression before '?' token
   14 | ????????????        printf("%d\n",a-b);
      | ^
main.c:14:39: error: expected ':' before ';' token
   14 | ????????????        printf("%d\n",a-b);
      |                                       ^
      |                                       :
main.c:15:1: error: expected expression before '?' token
   15 | ????????        }else if(op=='*'){
      | ^
main.c:16:1: error: expected expression before '?' token
   16 | ????????????      printf("%d\n",a*b);
      | ^
main.c:16:37: error: expected ':' before ';' token
   16 | ????????????      printf("%d\n",a*b);
      |                                     ^
      |                                     :
main.c:17:1: error: expected expression before '?' token
   17 | ????????        }else if(op=='/'){
      | ^
main.c:18:1: error: expected expression before '?' token
   18 | ????????           ??printf("%d\n",a/b);
      | ^
main.c:18:40: error: expected ':' before ';' token
   18 | ????????           ??printf("%d\n",a/b);
      |                                        ^
      |                                        :
Language: C

#include<stdio.h>

int main()
{
    int a,b;
    char op;
    while(1){
        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:12:1: error: expected expression before '?' token
   12 | ????????????        printf("%d\n",a+b);
      | ^
main.c:12:39: error: expected ':' before ';' token
   12 | ????????????        printf("%d\n",a+b);
      |                                       ^
      |                                       :
main.c:13:1: error: expected expression before '?' token
   13 | ????????        }else if(op=='-'){
      | ^
main.c:14:1: error: expected expression before '?' token
   14 | ????????????        printf("%d\n",a-b);
      | ^
main.c:14:39: error: expected ':' before ';' token
   14 | ????????????        printf("%d\n",a-b);
      |                                       ^
      |                                       :
main.c:15:1: error: expected expression before '?' token
   15 | ????????        }else if(op=='*'){
      | ^
main.c:16:1: error: expected expression before '?' token
   16 | ????????????      printf("%d\n",a*b);
      | ^
main.c:16:37: error: expected ':' before ';' token
   16 | ????????????      printf("%d\n",a*b);
      |                                     ^
      |                                     :
main.c:17:1: error: expected expression before '?' token
   17 | ????????        }else if(op=='/'){
      | ^
main.c:18:1: error: expected expression before '?' token
   18 | ????????           ??printf("%d\n",a/b);
      | ^
main.c:18:40: error: expected ':' before ';' token
   18 | ????????           ??printf("%d\n",a/b);
      |                                        ^
      |                                        :
main.c: At top level:
main.c:21:5: error: expected identifier or '(' before 'return'
   21 |     return 0;
      |     ^~~~~~
main.c:22:1: error: expected identifier or '(' before '}' token
   22 | }
      | ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:14:38: warning: missing terminating " character
   14 |                 if(op[i]=='+')printf("%d\",a[0][i]+[1][i]);
      |                                      ^
main.c:14:38: error: missing terminating " character
   14 |                 if(op[i]=='+')printf("%d\",a[0][i]+[1][i]);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~
main.c:15:17: error: expected expression before 'else'
   15 |                 else if(op[i]=='-')printf("%d\",a[0][i]-[1][i]);
      |                 ^~~~
main.c:15:43: warning: missing terminating " character
   15 |                 else if(op[i]=='-')printf("%d\",a[0][i]-[1][i]);
      |                                           ^
main.c:15:43: error: missing terminating " character
   15 |                 else if(op[i]=='-')printf("%d\",a[0][i]-[1][i]);
      |                                           ^~~~~~~~~~~~~~~~~~~~~~
main.c:16:43: warning: missing terminating " character
   16 |                 else if(op[i]=='/')printf("%d\",a[0][i]/[1][i]);
      |                                           ^
main.c:16:43: error: missing terminating " character
   16 |                 else if(op[i]=='/')printf("%d\",a[0][i]/[1][i]);
      |                                           ^~~~~~~~~~~~~~~~~~~~~~
main.c:17:43: warning: missing terminating " character
   17 |                 else if(op[i]=='*')printf("%d\",a[0][i]*[1][i]);
      |                                           ^
main.c:17:43: error: missing terminating " character
   17 |                 else if(op[i]=='*')printf("%d\",a[0][i]*[1][i]);
      |                                           ^~~~~~~~~~~~~~~~~~~~~~
main.c:20:1: error: expected declaration or statement at end of input
   20 | }
      | ^
main.c:20:1: error: expected declaration or statement at end of input
Language: C

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

Compiler output:
main.c:1:1: error: stray '##' in program
    1 | ##include<stdio.h>
      | ^~
main.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | ##include<stdio.h>
      |          ^
Language: C

#include<stdio.h>
int main()
{

	int a,b,c[2000],i,j;
	char op;
	i=0;
	while(1)
	{
		scanf("%d%c%d",&a,&op,&b);
		if(op=='?')
		{
		break;
		}
		else if(op=='+')
		{
			c[i]=a+b;
		}
		else if(op=='-')
		{
			c[i]=a-b;
		
		}
		else if(op=='*')
		{
			c[i]=a*b;
		
		}
		else (op=='/')
		{
			c[i]=a/b;
		}
		i++;
	}

	for(j=0;j<i;j++)
	{
		printf("%d\n",c[j]);
	}
	
	return 0;	
}

Compiler output:
main.c: In function 'main':
main.c:29:31: error: expected ';' before '{' token
   29 |                 else (op=='/')
      |                               ^
      |                               ;
   30 |                 {
      |                 ~
Language: C

#include<stdio.h>
int main(void)
{
	int a,b;
	char 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{
		break;
	}
	
	return 0;
}

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

#include<stdio.h>
int main(void)
{
	int a[100];
	int b[100];
	char op[100];
	int i = 0,j;
	
	while(1){
	
		scanf("%d %c %d", &a[i], &op[i], &b[i]);
		if(op[i] == '?') break;
	}
	
	for(j = 0;j < i;j++)
	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:15: warning: comparison between pointer and integer
   16 |         if(op == '+'){
      |               ^~
main.c:17:34: error: invalid operands to binary + (have 'int *' and 'int *')
   17 |                 printf("%d\n", a + b);
      |                                ~ ^
      |                                | |
      |                                | int *
      |                                int *
main.c:18:21: warning: comparison between pointer and integer
   18 |         }else if(op == '-'){
      |                     ^~
main.c:20:21: warning: comparison between pointer and integer
   20 |         }else if(op == '*'){
      |                     ^~
main.c:21:34: error: invalid operands to binary * (have 'int *' and 'int *')
   21 |                 printf("%d\n", a * b);
      |                                ~ ^
      |                                | |
      |                                | int *
      |                                int *
main.c:22:21: warning: comparison between pointer and integer
   22 |         }else if(op == '/'){
      |                     ^~
main.c:23:34: error: invalid operands to binary / (have 'int *' and 'int *')
   23 |                 printf("%d\n", a / b);
      |                                ~ ^
      |                                | |
      |                                | int *
      |                                int *
Language: C

#include<stdio.h>
int main(void)
{
	int a[100];
	int b[100];
	char op[100];
	int i = 0,j;
	
	while(1){
	
		scanf("%d %c %d", &a[i], &op[i], &b[i]);
		if(op[i] == '?')break;
	}
	
	for(j = 0;j < i;j++)
	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:15: warning: comparison between pointer and integer
   16 |         if(op == '+'){
      |               ^~
main.c:17:34: error: invalid operands to binary + (have 'int *' and 'int *')
   17 |                 printf("%d\n", a + b);
      |                                ~ ^
      |                                | |
      |                                | int *
      |                                int *
main.c:18:21: warning: comparison between pointer and integer
   18 |         }else if(op == '-'){
      |                     ^~
main.c:20:21: warning: comparison between pointer and integer
   20 |         }else if(op == '*'){
      |                     ^~
main.c:21:34: error: invalid operands to binary * (have 'int *' and 'int *')
   21 |                 printf("%d\n", a * b);
      |                                ~ ^
      |                                | |
      |                                | int *
      |                                int *
main.c:22:21: warning: comparison between pointer and integer
   22 |         }else if(op == '/'){
      |                     ^~
main.c:23:34: error: invalid operands to binary / (have 'int *' and 'int *')
   23 |                 printf("%d\n", a / b);
      |                                ~ ^
      |                                | |
      |                                | int *
      |                                int *
Language: C

#include<stdio.h>
int main(void){
     int a,op,b,k;
     while(0){
          scanf("%d %c %d"&a,&op,&b);
     
          if (op=='+'){
             k=a+b;
          }else 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",k)
     }
     reuturn 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:27: error: invalid operands to binary & (have 'char *' and 'int')
    5 |           scanf("%d %c %d"&a,&op,&b);
      |                 ~~~~~~~~~~^
      |                 |
      |                 char *
main.c:18:25: error: expected ';' before '}' token
   18 |           printf("%d",k)
      |                         ^
      |                         ;
   19 |      }
      |      ~                   
main.c:20:6: error: 'reuturn' undeclared (first use in this function)
   20 |      reuturn 0;
      |      ^~~~~~~
main.c:20:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:13: error: expected ';' before numeric constant
   20 |      reuturn 0;
      |             ^~
      |             ;
Language: C

#include<stdio.h>
int main(void){
     int a,op,b,k;
     while(0){
          scanf("%d %c %d"&a,&op,&b);
     
          if (op=='+'){
             k=a+b;
          }else 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)
     }
     reuturn 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:27: error: invalid operands to binary & (have 'char *' and 'int')
    5 |           scanf("%d %c %d"&a,&op,&b);
      |                 ~~~~~~~~~~^
      |                 |
      |                 char *
main.c:18:27: error: expected ';' before '}' token
   18 |           printf("%d\n",k)
      |                           ^
      |                           ;
   19 |      }
      |      ~                     
main.c:20:6: error: 'reuturn' undeclared (first use in this function)
   20 |      reuturn 0;
      |      ^~~~~~~
main.c:20:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:13: error: expected ';' before numeric constant
   20 |      reuturn 0;
      |             ^~
      |             ;
Language: C

#include<stdio.h>
int main(void){
     int a,op,b,k;
     while(0){
          scanf("%d %c %d"&a,&op,&b);
     
          if (op=='+'){
             k=a+b;
          }else 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:5:27: error: invalid operands to binary & (have 'char *' and 'int')
    5 |           scanf("%d %c %d"&a,&op,&b);
      |                 ~~~~~~~~~~^
      |                 |
      |                 char *
main.c:18:27: error: expected ';' before '}' token
   18 |           printf("%d\n",k)
      |                           ^
      |                           ;
   19 |      }
      |      ~
Language: C

#include<stdio.h>
int main(void){
     int a,b,k;
     char op;
     while(op != ''){
          scanf("%d %c %d"&a,&op,&b);
     
          if (op=='+'){
             k=a+b;
          }else 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:5:18: error: empty character constant
    5 |      while(op != ''){
      |                  ^~
main.c:6:27: error: invalid operands to binary & (have 'char *' and 'int')
    6 |           scanf("%d %c %d"&a,&op,&b);
      |                 ~~~~~~~~~~^
      |                 |
      |                 char *
main.c:19:27: error: expected ';' before '}' token
   19 |           printf("%d\n",k)
      |                           ^
      |                           ;
   20 |      }
      |      ~
Language: C

#include<stdio.h>
int main(void){
     int a,b,k;
     char op;
     while(op != '?'){
          scanf("%d %c %d"&a,&op,&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:6:27: error: invalid operands to binary & (have 'char *' and 'int')
    6 |           scanf("%d %c %d"&a,&op,&b);
      |                 ~~~~~~~~~~^
      |                 |
      |                 char *
main.c:17:27: error: expected ';' before '}' token
   17 |           printf("%d\n",k)
      |                           ^
      |                           ;
   18 |      }
      |      ~
Language: C

using System;

class SimpleCalculator{
        static void Main(string[] args){
	  while(true){
	    int a = int.Parse(Console.Read());
	    char op = char.Parse(Console.Read());
	    int b = int.Parse(Console.Read());
	    if(op == '?') break;
	    int c;
	    switch(op){
	      case '+':
	        c = a + b;
		break;
	      case '-':
	        c = a - b;
		break;
	      case '*':
	        c = a * b;
		break;
              case '/':
	        c = a / b;
		break;
	    }
	    Console.WriteLine("{0}",c);
	  }
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'using'
    1 | using System;
      | ^~~~~
main.c:3:1: error: unknown type name 'class'
    3 | class SimpleCalculator{
      | ^~~~~
main.c:3:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | class SimpleCalculator{
      |                       ^
Language: C

#include<stdio.h>
int main()
{
int a,b;
char op;
for(;;)
{
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:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
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:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
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:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
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:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

#include<stdio.h>
int main()
{
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:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

#include <stdio.h>

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

	scanf("%d %s %d",&a,&op,&b);

	while(op != "?")
	{
		scanf("%d %s %d",&a,&op,&b);
		if(op == "?")
		{
			break;
		}else if(op == "+")
		{
			printf("%d",a + b);
		}else if(op == "-")
		{
			printf("%d", a - b);
		}else if(op == "*")
		{
			printf("%d",a * b);
		}else
		{
			printf("%d",a / b)
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:18: warning: comparison between pointer and integer
   10 |         while(op != "?")
      |                  ^~
main.c:13:23: warning: comparison between pointer and integer
   13 |                 if(op == "?")
      |                       ^~
main.c:16:29: warning: comparison between pointer and integer
   16 |                 }else if(op == "+")
      |                             ^~
main.c:19:29: warning: comparison between pointer and integer
   19 |                 }else if(op == "-")
      |                             ^~
main.c:22:29: warning: comparison between pointer and integer
   22 |                 }else if(op == "*")
      |                             ^~
main.c:27:43: error: expected ';' before '}' token
   27 |                         printf("%d",a / b)
      |                                           ^
      |                                           ;
   28 |                 }
      |                 ~
Language: C

#include <stdio.h>

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

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

    switch(op){
        case '+':
             result = a + b;
             break;
        case '-':
             result = a - b;
             break;
        case '*':
             results = a * b;
             break;
        case '/':
             results = a / b;
             break;
    }
    printf("%lf\n", result);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:14: error: 'results' undeclared (first use in this function); did you mean 'result'?
   18 |              results = a * b;
      |              ^~~~~~~
      |              result
main.c:18:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <limits.h>
??
int main(void){
????????int n, m;
????????int i;
????????int max = -INT_MAX;
????????int min = INT_MAX;
????????int sum = 0;
??
????????scanf("%d", &n);
????
????????for(i = 0; i < n; i++){
????????????????scanf("%d ", &m);
????????????????sum += m;
????????????????if(max < m) max = m;
????????????????if(min > m) min = m;
????????}
????????printf("%d %d %d\n", min, max, sum);
????????return 0;
}
??
????????

Compiler output:
main.c:3:1: error: expected identifier or '(' before '?' token
    3 | ??
      | ^
main.c:22:1: error: expected identifier or '(' before '?' token
   22 | ??
      | ^
Language: C

#include <stdio.h>
#include <limits.h>
int main(void){
int n, m;
int i;
int max = -INT_MAX;
int min = INT_MAX;
int sum = 0;
scanf("%d", &n);
for(i = 0; i < n; i++){
scanf("%d ", &m);
sum += m;
if(max < m) max = m;
if(min > m) min = m;
}
printf("%d %d %d\n", min, max, sum);
return 0;
}
????????

Compiler output:
main.c:19:1: error: expected identifier or '(' before '?' token
   19 | ????????
      | ^
Language: C

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

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

  if(op == '+'){
   c = a+b;
  }else if(op == '-'){
   c = a-b;
  }else if(op == '*'){
   c = a*b;
  }else if(op == '/'){
   c = a/b;
  }else{
   f = 1;
  }
  printf("%d" c);
 }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:3: 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 | int main (void){
main.c:9:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    9 |   scanf("%d %c %d", &a, &op, &b);
      |   ^~~~~
main.c:9:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:22:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   22 |   printf("%d" c);
      |   ^~~~~~
main.c:22:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:22:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:14: error: expected ')' before 'c'
   22 |   printf("%d" c);
      |         ~    ^~
      |              )
Language: C

#include<stdio.h>


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

Compiler output:
main.c: In function 'main':
main.c:19:1: error: expected declaration or statement at end of input
   19 | }
      | ^
Language: C

#include<stdio.h>
int main(){
	int a,b;
	char c;
	while(1){
	scanf("%d %c %d",&a,&c,&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: In function 'main':
main.c:15:1: error: expected declaration or statement at end of input
   15 | }
      | ^
Language: C

#include<stdio.h>
int main(void){
  int a,b,x,k;
  k=1;
  char op;
  while(k != 0){
  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 if(op == '/'){
      x = a / b;
    }
    printf("%d\n",x);
    k++;
  }

Compiler output:
main.c: In function 'main':
main.c:22:3: error: expected declaration or statement at end of input
   22 |   }
      |   ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:6:33: error: invalid operands to binary & (have 'int *' and 'int')
    6 |             scanf("%d %c %d",&a &op &b);
      |                              ~~ ^
      |                              |
      |                              int *
Language: C

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

    while(1){
        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{
            break;
        }
    }
    
    return 0;
}

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

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:37:38: error: expected ';' before ':' token
   37 |                                 break:
      |                                      ^
      |                                      ;
Language: C

#include <stdio.h>

int main(void)
{
	int a;
	int b;
	char op;
	
	while (1)
	{
		scanf("%d %c %d", &a, &op, &b);
		
		if (op == '?')
		{
			break;
		}
		
		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:37:38: error: expected ';' before ':' token
   37 |                                 break:
      |                                      ^
      |                                      ;
Language: C

#include <stdio.h>
#include <math.h>


/*

?¨???????

2????????´??° a, b ??¨1??????????????? op ?????????????????§???a op b ????¨??????????????????°?????????????????????????????????????????????????????? op ??????"+"(???)???"-"(???)???"*"(???)???"/"(???)???????????¨?????????????????§????????????????????´??????????°???°?????\??????????????¨????????????????¨????????????¨????????????

Input
??\???????????°????????????????????????????§???????????????????????????????????????????????????¢????????\????????¨????????§???:

a op b

op ??? '?' ?????¨??? ??\?????????????????????????????????????????±???????????????????????£????????????????????????

Output
?????????????????????????????????????¨?????????????1??????????????????????????????

*/

int main( )
{
	int a, b;

	char c;

	while ( scanf( "%d %d %c", &a, &b &c ) != EOF ) {

	switch ( c ) {
		default:
		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:29:43: error: invalid operands to binary & (have 'int *' and 'int')
   29 |         while ( scanf( "%d %d %c", &a, &b &c ) != EOF ) {
      |                                        ~~ ^
      |                                        |
      |                                        int *
main.c:33:25: error: expected ':' or '...' before ';' token
   33 |                 case '+';
      |                         ^
main.c:36:25: error: expected ':' or '...' before ';' token
   36 |                 case '-';
      |                         ^
main.c:39:25: error: expected ':' or '...' before ';' token
   39 |                 case '*';
      |                         ^
main.c:42:25: error: expected ':' or '...' before ';' token
   42 |                 case '/';
      |                         ^
main.c:48:1: error: expected declaration or statement at end of input
   48 | }
      | ^
Language: C

#include <stdio.h>
#include <math.h>


/*

?¨???????

2????????´??° a, b ??¨1??????????????? op ?????????????????§???a op b ????¨??????????????????°?????????????????????????????????????????????????????? op ??????"+"(???)???"-"(???)???"*"(???)???"/"(???)???????????¨?????????????????§????????????????????´??????????°???°?????\??????????????¨????????????????¨????????????¨????????????

Input
??\???????????°????????????????????????????§???????????????????????????????????????????????????¢????????\????????¨????????§???:

a op b

op ??? '?' ?????¨??? ??\?????????????????????????????????????????±???????????????????????£????????????????????????

Output
?????????????????????????????????????¨?????????????1??????????????????????????????

*/

int main( void )
{
	int a, b;

	char c;

	while ( scanf( "%d %d %c", &a, &b &c ) != EOF ) {

	switch ( c ) {
		default:
		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:29:43: error: invalid operands to binary & (have 'int *' and 'int')
   29 |         while ( scanf( "%d %d %c", &a, &b &c ) != EOF ) {
      |                                        ~~ ^
      |                                        |
      |                                        int *
main.c:33:25: error: expected ':' or '...' before ';' token
   33 |                 case '+';
      |                         ^
main.c:36:25: error: expected ':' or '...' before ';' token
   36 |                 case '-';
      |                         ^
main.c:39:25: error: expected ':' or '...' before ';' token
   39 |                 case '*';
      |                         ^
main.c:42:25: error: expected ':' or '...' before ';' token
   42 |                 case '/';
      |                         ^
main.c:48:1: error: expected declaration or statement at end of input
   48 | }
      | ^
Language: C

#include <stdio.h>
#include <math.h>

/*

?¨???????

2????????´??° a, b ??¨1??????????????? op ?????????????????§???a op b ????¨??????????????????°?????????????????????????????????????????????????????? op ??????"+"(???)???"-"(???)???"*"(???)???"/"(???)???????????¨?????????????????§????????????????????´??????????°???°?????\??????????????¨????????????????¨????????????¨????????????

Input
??\???????????°????????????????????????????§???????????????????????????????????????????????????¢????????\????????¨????????§???:

a op b

op ??? '?' ?????¨??? ??\?????????????????????????????????????????±???????????????????????£????????????????????????

Output
?????????????????????????????????????¨?????????????1??????????????????????????????

*/

int main( void )
{
	int a, b;

	char c;

	while ( 1 ) {

		scanf( "%d %d %c", &a, &c, &b ) != EOF

		switch ( c ) {
			default:
				break;
			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;
		}

		if ( c == '?' ) {
			break;
		}
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:32:17: error: expected ';' before 'switch'
   32 |                 switch ( c ) {
      |                 ^~~~~~
Language: C

#include <stdio.h>

int main(void){
int a,b;
char op;
while (1){
scanf("%d %c %d",&a,&op,&b)
if(op=="0"){
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:7:28: error: expected ';' before 'if'
    7 | scanf("%d %c %d",&a,&op,&b)
      |                            ^
      |                            ;
    8 | if(op=="0"){
      | ~~
Language: C

#include <stdio.h>

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

 while(1){
  scanf("%d %s %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);
  }
  if ( op == '?' ) 
   break;
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:1: error: expected expression before '?' token
   11 | ???printf("%d\n",a+b);
      | ^
main.c:11:22: error: expected ':' before ';' token
   11 | ???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);
      |                      ^
      |                      :
main.c:17:1: error: expected expression before '?' token
   17 | ???printf("%d\n",a*b);
      | ^
main.c:17:22: error: expected ':' before ';' token
   17 | ???printf("%d\n",a*b);
      |                      ^
      |                      :
main.c:20:1: error: expected expression before '?' token
   20 | ???printf("%d\n",a/b);
      | ^
main.c:20:22: error: expected ':' before ';' token
   20 | ???printf("%d\n",a/b);
      |                      ^
      |                      :
main.c:25:1: error: expected declaration or statement at end of input
   25 | }
      | ^
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);
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:36: error: expected ';' before 'while'
    6 |         scanf("%d %c %d",&a,&op,&b)
      |                                    ^
      |                                    ;
    7 |         while(op!='?'){
      |         ~~~~~
Language: C

int main(){
int a,b,i,o;
for(i=0; ;i++){
scanf("%d%d%d", &a, &o, &b);
if(o==+){
printf("%d\n", a+b);
}else if(o==-){
printf("%d\n", a-b);
}else if(o==*){
printf("%d\n", a*b);
}else if(o==/){
printf("%d\n", a/b);
}else{
break;
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:1: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 | scanf("%d%d%d", &a, &o, &b);
      | ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){
main.c:4:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 | scanf("%d%d%d", &a, &o, &b);
      | ^~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:8: error: expected expression before ')' token
    5 | if(o==+){
      |        ^
main.c:6:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    6 | printf("%d\n", a+b);
      | ^~~~~~
main.c:6:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:6:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:6:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:14: error: expected expression before ')' token
    7 | }else if(o==-){
      |              ^
main.c:8:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    8 | printf("%d\n", a-b);
      | ^~~~~~
main.c:8:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:9:14: error: expected expression before ')' token
    9 | }else if(o==*){
      |              ^
main.c:10:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   10 | printf("%d\n", a*b);
      | ^~~~~~
main.c:10:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:13: error: expected expression before '/' token
   11 | }else if(o==/){
      |             ^
main.c:12:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   12 | printf("%d\n", a/b);
      | ^~~~~~
main.c:12:1: note: include '<stdio.h>' or provide a declaration of 'printf'