criyle/codenet-compile-errors huggingface dataset:
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);
        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:14: warning: comparison between pointer and integer
    7 |         if(op=="?")break;
      |              ^~
main.c:8:14: warning: comparison between pointer and integer
    8 |         if(op=="+")printf("%d\n"a+b);
      |              ^~
main.c:8:33: error: expected ')' before 'a'
    8 |         if(op=="+")printf("%d\n"a+b);
      |                          ~      ^
      |                                 )
main.c:9:19: warning: comparison between pointer and integer
    9 |         else if(op=="-")printf("%d\n"a-b);
      |                   ^~
main.c:9:38: error: expected ')' before 'a'
    9 |         else if(op=="-")printf("%d\n"a-b);
      |                               ~      ^
      |                                      )
main.c:10:19: warning: comparison between pointer and integer
   10 |         else if(op=="*")printf("%d\n"a*b);
      |                   ^~
main.c:10:38: error: expected ')' before 'a'
   10 |         else if(op=="*")printf("%d\n"a*b);
      |                               ~      ^
      |                                      )
main.c:11:19: warning: comparison between pointer and integer
   11 |         else if(op=="/")printf("%d\n"a/b);
      |                   ^~
main.c:11:38: error: expected ')' before 'a'
   11 |         else if(op=="/")printf("%d\n"a/b);
      |                               ~      ^
      |                                      )
Language: C

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

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


Compiler output:
main.c: In function 'main':
main.c:25:9: error: expected declaration or statement at end of input
   25 |         return 0;
      |         ^~~~~~
Language: C

#include <stdio.h>
#include <string.h>
int main(int argc, const char * argv[]) {
    int a,b;
    int answer=0;
    char op[2];
    
   //
//  main.c
//  1_4 c
//
//  Created by x17037xx on 2017/10/21.
//  Copyright © 2017年 AIT. All rights reserved.
//

#include <stdio.h>
#include <string.h>
int main(int argc, const char * argv[]) {
    int a,b;
    int answer=0;
    char op[2];
    
    while(1){
        scanf("%d %c %d",&a,op,&b);//読み込み
        
        if(strcmp(op,"+")==0){
            answer = a + b;//＋のとき和
        }else if(strcmp(op,"-")==0){
            answer = a - b;//ーのとき差
        }else if(strcmp(op,"*")==0){
            answer = a * b;//＊のとき積
        }else if(strcmp(op,"/")==0){
            answer = a / b;// /のとき商
        }else(strcmp(op,"?")==0){
            break;
        }
        
        printf("%d",answer);

    }

    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:34:33: error: expected ';' before '{' token
   34 |         }else(strcmp(op,"?")==0){
      |                                 ^
      |                                 ;
main.c: In function 'main':
main.c:43:1: error: expected declaration or statement at end of input
   43 | }
      | ^
Language: C

#include<stdio.h>

int main(){
  int a,b,op,x,ans;
   scanf("%d %c %d",&a,&op,&b);
   for(x=0;;x++){
     if(op == ?) break;
     ans = a op b;
     printf("%d",ans);
   }
   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:15: error: expected expression before '?' token
    7 |      if(op == ?) break;
      |               ^
main.c:8:13: error: expected ';' before 'op'
    8 |      ans = a op b;
      |             ^~~
      |             ;
Language: C

#include<stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:5:14: error: expected expression before ',' token
    5 |   char op = +,-,/,*;
      |              ^
main.c:8:15: error: expected expression before '?' token
    8 |      if(op == ?) break;
      |               ^
main.c:9:13: error: expected ';' before 'op'
    9 |      ans = a op b;
      |             ^~~
      |             ;
Language: C

#include<stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:8:15: error: expected expression before '?' token
    8 |      if(op == ?) break;
      |               ^
main.c:9:14: error: stray '`' in program
    9 |      if(op ==`+`){
      |              ^
main.c:9:16: error: stray '`' in program
    9 |      if(op ==`+`){
      |                ^
main.c:9:17: error: expected expression before ')' token
    9 |      if(op ==`+`){
      |                 ^
main.c:12:21: error: stray '`' in program
   12 |      } else if(op ==`-`){
      |                     ^
main.c:12:23: error: stray '`' in program
   12 |      } else if(op ==`-`){
      |                       ^
main.c:12:24: error: expected expression before ')' token
   12 |      } else if(op ==`-`){
      |                        ^
main.c:15:21: error: stray '`' in program
   15 |      } else if(op ==`*`){
      |                     ^
main.c:15:23: error: stray '`' in program
   15 |      } else if(op ==`*`){
      |                       ^
main.c:15:24: error: expected expression before ')' token
   15 |      } else if(op ==`*`){
      |                        ^
main.c:18:21: error: stray '`' in program
   18 |      } else if(op ==`/`){
      |                     ^
main.c:18:22: error: expected expression before '/' token
   18 |      } else if(op ==`/`){
      |                      ^
main.c:18:23: error: stray '`' in program
   18 |      } else if(op ==`/`){
      |                       ^
Language: C

#include<stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:8:15: error: expected expression before '?' token
    8 |      if(op == ?) break;
      |               ^
main.c:9:14: error: stray '`' in program
    9 |      if(op ==`+`){
      |              ^
main.c:9:16: error: stray '`' in program
    9 |      if(op ==`+`){
      |                ^
main.c:9:17: error: expected expression before ')' token
    9 |      if(op ==`+`){
      |                 ^
main.c:12:21: error: stray '`' in program
   12 |      } else if(op ==`-`){
      |                     ^
main.c:12:23: error: stray '`' in program
   12 |      } else if(op ==`-`){
      |                       ^
main.c:12:24: error: expected expression before ')' token
   12 |      } else if(op ==`-`){
      |                        ^
main.c:15:21: error: stray '`' in program
   15 |      } else if(op ==`*`){
      |                     ^
main.c:15:23: error: stray '`' in program
   15 |      } else if(op ==`*`){
      |                       ^
main.c:15:24: error: expected expression before ')' token
   15 |      } else if(op ==`*`){
      |                        ^
main.c:18:21: error: stray '`' in program
   18 |      } else if(op ==`/`){
      |                     ^
main.c:18:22: error: expected expression before '/' token
   18 |      } else if(op ==`/`){
      |                      ^
main.c:18:23: error: stray '`' in program
   18 |      } else if(op ==`/`){
      |                       ^
Language: C

#include<stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:8:15: error: expected expression before '?' token
    8 |      if(op == ?) break;
      |               ^
main.c:9:14: error: stray '`' in program
    9 |      if(op ==`+`){
      |              ^
main.c:9:16: error: stray '`' in program
    9 |      if(op ==`+`){
      |                ^
main.c:9:17: error: expected expression before ')' token
    9 |      if(op ==`+`){
      |                 ^
main.c:12:21: error: stray '`' in program
   12 |      } else if(op ==`-`){
      |                     ^
main.c:12:23: error: stray '`' in program
   12 |      } else if(op ==`-`){
      |                       ^
main.c:12:24: error: expected expression before ')' token
   12 |      } else if(op ==`-`){
      |                        ^
main.c:15:22: error: expected expression before ')' token
   15 |      } else if(op ==*){
      |                      ^
main.c:18:21: error: stray '`' in program
   18 |      } else if(op ==`/`){
      |                     ^
main.c:18:22: error: expected expression before '/' token
   18 |      } else if(op ==`/`){
      |                      ^
main.c:18:23: error: stray '`' in program
   18 |      } else if(op ==`/`){
      |                       ^
Language: C

#include<stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:8:15: error: expected expression before '?' token
    8 |      if(op == ?) break;
      |               ^
main.c:9:14: error: stray '`' in program
    9 |      if(op ==`+`){
      |              ^
main.c:9:16: error: stray '`' in program
    9 |      if(op ==`+`){
      |                ^
main.c:9:17: error: expected expression before ')' token
    9 |      if(op ==`+`){
      |                 ^
main.c:12:21: error: stray '`' in program
   12 |      } else if(op ==`-`){
      |                     ^
main.c:12:23: error: stray '`' in program
   12 |      } else if(op ==`-`){
      |                       ^
main.c:12:24: error: expected expression before ')' token
   12 |      } else if(op ==`-`){
      |                        ^
main.c:15:22: error: expected expression before ')' token
   15 |      } else if(op ==*){
      |                      ^
main.c:18:21: error: expected expression before '/' token
   18 |      } else if(op ==/){
      |                     ^
Language: C

#include<stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:8:15: error: expected expression before '?' token
    8 |      if(op == ?) break;
      |               ^
main.c:9:15: error: expected expression before ')' token
    9 |      if(op ==+){
      |               ^
main.c:12:22: error: expected expression before ')' token
   12 |      } else if(op ==-){
      |                      ^
main.c:15:22: error: expected expression before ')' token
   15 |      } else if(op ==*){
      |                      ^
main.c:18:21: error: expected expression before '/' token
   18 |      } else if(op ==/){
      |                     ^
Language: C

#include<stdio.h>

int main(){
  int a,b,x,ans;
  char op;
   for(x=0;op==?;x++){
    scanf("%d %c %d",&a,&op,&b);
     if(op ==`+`){
       ans = a + b;
       printf("%d",ans);
     } else if(op ==`-`){
       ans = a - b;
       printf("%d",ans);
     } else if(op ==`*`){
       ans = a*b;
       printf("%d",ans);
     } else if(op ==`/`){
       ans = a/b;
       printf("%d",ans);
     }
   }
   return 0;
}


Compiler output:
main.c: In function 'main':
main.c:6:16: error: expected expression before '?' token
    6 |    for(x=0;op==?;x++){
      |                ^
main.c:8:14: error: stray '`' in program
    8 |      if(op ==`+`){
      |              ^
main.c:8:16: error: stray '`' in program
    8 |      if(op ==`+`){
      |                ^
main.c:8:17: error: expected expression before ')' token
    8 |      if(op ==`+`){
      |                 ^
main.c:11:21: error: stray '`' in program
   11 |      } else if(op ==`-`){
      |                     ^
main.c:11:23: error: stray '`' in program
   11 |      } else if(op ==`-`){
      |                       ^
main.c:11:24: error: expected expression before ')' token
   11 |      } else if(op ==`-`){
      |                        ^
main.c:14:21: error: stray '`' in program
   14 |      } else if(op ==`*`){
      |                     ^
main.c:14:23: error: stray '`' in program
   14 |      } else if(op ==`*`){
      |                       ^
main.c:14:24: error: expected expression before ')' token
   14 |      } else if(op ==`*`){
      |                        ^
main.c:17:21: error: stray '`' in program
   17 |      } else if(op ==`/`){
      |                     ^
main.c:17:22: error: expected expression before '/' token
   17 |      } else if(op ==`/`){
      |                      ^
main.c:17:23: error: stray '`' in program
   17 |      } else if(op ==`/`){
      |                       ^
Language: C

#include<stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:7:17: error: expected expression before '=' token
    7 |    for(x=0;op !=="?";x++){
      |                 ^
main.c:11:19: warning: comparison between pointer and integer
   11 |      } else if(op =="-"){
      |                   ^~
main.c:14:19: warning: comparison between pointer and integer
   14 |      } else if(op =="*"){
      |                   ^~
main.c:17:19: warning: comparison between pointer and integer
   17 |      } else if(op =="/"){
      |                   ^~
Language: C

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

int main(void){
	
	int a,b,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:23:1: error: expected declaration or statement at end of input
   23 | }
      | ^
Language: C

def calc(a):
    if a[1]=="+": return int(a[0])+int(a[2])
    if a[1]=="-": return int(a[0])-int(a[2])
    if a[1]=="/": return int(a[0])/int(a[2])

res=[]
while 1:
    b=raw_input().split()
    if b[1]=="?":break
    res.append([calc(b)])
[print(i) for i in res]


Compiler output:
main.c:1:1: error: unknown type name 'def'
    1 | def calc(a):
      | ^~~
main.c: In function 'calc':
main.c:1:12: error: expected declaration specifiers before ':' token
    1 | def calc(a):
      |            ^
main.c:1:5: error: type of 'a' defaults to 'int' [-Wimplicit-int]
    1 | def calc(a):
      |     ^~~~
Language: C

#include <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:9:17: warning: missing terminating ' character
    9 |     while(op == '?){
      |                 ^
main.c:9:17: error: missing terminating ' character
    9 |     while(op == '?){
      |                 ^~~~
main.c:11:39: error: expected ')' before ';' token
   11 |         scanf("%d %c %d", &a, &op, &b);
      |                                       ^
      |                                       )
main.c:9:10: note: to match this '('
    9 |     while(op == '?){
      |          ^
main.c:28:5: error: expected expression before '}' token
   28 |     }
      |     ^
main.c: At top level:
main.c:30:5: error: expected identifier or '(' before 'return'
   30 |     return 0;
      |     ^~~~~~
main.c:31:1: error: expected identifier or '(' before '}' token
   31 | }
      | ^
Language: C

#include <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:9:17: warning: missing terminating ' character
    9 |     while(op == '?){
      |                 ^
main.c:9:17: error: missing terminating ' character
    9 |     while(op == '?){
      |                 ^~~~
main.c:11:39: error: expected ')' before ';' token
   11 |         scanf("%d %c %d", &a, &op, &b);
      |                                       ^
      |                                       )
main.c:9:10: note: to match this '('
    9 |     while(op == '?){
      |          ^
main.c:28:5: error: expected expression before '}' token
   28 |     }
      |     ^
main.c: At top level:
main.c:30:5: error: expected identifier or '(' before 'return'
   30 |     return 0;
      |     ^~~~~~
main.c:31:1: error: expected identifier or '(' before '}' token
   31 | }
      | ^
Language: C

#include <stdio.>

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


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

#include <stdio.>

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


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

#include <stdio.>

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


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

#include <stdio.>

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


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

#include<stdio.h>
int main(){
  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);
  }



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

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



Compiler output:
main.c:1:2: error: invalid preprocessing directive #!
    1 | #!include<stdio.h>
      |  ^
main.c: In function 'main':
main.c:6:5: 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 | #!include<stdio.h>
main.c:6:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |     scanf("%d %c %d", &a, &op, &b);
      |     ^~~~~
main.c:6:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    8 |       printf("%d\n", a+b);
      |       ^~~~~~
main.c:8:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:8:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:11:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   11 |       printf("%d\n", a-b);
      |       ^~~~~~
main.c:11:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   14 |       printf("%d\n", a/b);
      |       ^~~~~~
main.c:14:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   17 |       printf("%d\n", a*b);
      |       ^~~~~~
main.c:17:7: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:13:3: error: stray '\343' in program
   13 |   <U+3000>printf("%d\n",c);
      |   ^~~~~~~~
main.c:16:1: error: stray '\343' in program
   16 | <U+3000>    c=a*b;
      | ^~~~~~~~
main.c:17:5: error: stray '\343' in program
   17 |     <U+3000>printf("%d\n",c);
      |     ^~~~~~~~
main.c:20:1: error: stray '\343' in program
   20 | <U+3000>    c=a/b;
      | ^~~~~~~~
main.c:21:5: error: stray '\343' in program
   21 |     <U+3000>printf("%d\n",c);
      |     ^~~~~~~~
main.c:24:1: error: stray '\343' in program
   24 | <U+3000>    break;
      | ^~~~~~~~
main.c:28:5: error: expected declaration or statement at end of input
   28 |     return 0;
      |     ^~~~~~
Language: C

include <stdio.h>
int main(void){
    int a, b, op;
    while(1){
    scanf("%d %d %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:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C

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

 


Compiler output:
main.c: In function 'main':
main.c:19:1: error: stray '\343' in program
   19 | <U+3000>return 0;
      | ^~~~~~~~
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;
    
    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: stray '\343' in program
   12 | <U+3000>printf("%d\n",a+b);
      | ^~~~~~~~
main.c:16:1: error: stray '\343' in program
   16 | <U+3000>printf("%d\n",a*b);
      | ^~~~~~~~
main.c:18:1: error: stray '\343' in program
   18 | <U+3000>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;
    
    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: stray '\343' in program
   12 | <U+3000>printf("%d\n",(a+b));
      | ^~~~~~~~
main.c:16:1: error: stray '\343' in program
   16 | <U+3000>printf("%d\n",a*b);
      | ^~~~~~~~
main.c:18:1: error: stray '\343' in program
   18 | <U+3000>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;     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:1:19: warning: extra tokens at end of #include directive
    1 | #include <stdio.h>int main(void){   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;}
      |                   ^~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:4:2: error: unknown type name 'String'
    4 |  String op;
      |  ^~~~~~
main.c:5:24: error: expected ';' before 'while'
    5 |  scanf("%d%s%d",a,op,b)
      |                        ^
      |                        ;
    6 |  while (op!='?'){
      |  ~~~~~
Language: C

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


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

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


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

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


Compiler output:
main.c: In function 'main':
main.c:5:27: error: expected ';' before '\U0000ff1b'
    5 |  scanf("%d%c%d",&a,&op,&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
     printf("%d\n",a/b);
    scanf("%d %c %d", &a, &op, &b);
  }
 return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:11: error: expected identifier or '(' before ';' token
    4 |  int a, b,;
      |           ^
Language: C

#include <stdio.h>
int main(void) 
{
	int a, b;
	char op;
	while (scanf("%d %s %d", &a, &op, &b) != EOF) {
	if (op == '?' && a == 0 && b == 0) {
		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:11:1: error: stray '\343' in program
   11 | <U+3000>                        printf("%d\n", a + b);
      | ^~~~~~~~
Language: C

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



Compiler output:
main.c: In function 'main':
main.c:11:1: error: stray '\343' in program
   11 | <U+3000>                        printf("%d\n", a + b);
      | ^~~~~~~~
Language: C

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

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



Compiler output:
main.c: In function 'main':
main.c:8:26: error: 'op' undeclared (first use in this function)
    8 |     scanf("%d %c %d",&a,&op,&b);
      |                          ^~
main.c:8:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:11: error: expected expression before '?' token
    9 |     if(op=?){
      |           ^
main.c:10:9: error: break statement not within loop or switch
   10 |         break;
      |         ^~~~~
main.c:13:17: warning: missing terminating ' character
   13 |     if(op == '+'')
      |                 ^
main.c:13:17: error: missing terminating ' character
   13 |     if(op == '+'')
      |                 ^~
main.c:13:17: error: expected ')' before 'printf'
   13 |     if(op == '+'')
      |       ~         ^
      |                 )
   14 |         printf("%d",a + b);
      |         ~~~~~~   
main.c:16:22: warning: missing terminating ' character
   16 |     else if(op == '-'')
      |                      ^
main.c:16:22: error: missing terminating ' character
   16 |     else if(op == '-'')
      |                      ^~
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
Language: C

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

    int a,b;
    char chr;
    
    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:8:26: error: 'op' undeclared (first use in this function)
    8 |     scanf("%d %c %d",&a,&op,&b);
      |                          ^~
main.c:8:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:11: error: expected expression before '?' token
    9 |     if(op=?){
      |           ^
main.c:10:9: error: break statement not within loop or switch
   10 |         break;
      |         ^~~~~
main.c:13:17: warning: missing terminating ' character
   13 |     if(op == '+'')
      |                 ^
main.c:13:17: error: missing terminating ' character
   13 |     if(op == '+'')
      |                 ^~
main.c:13:17: error: expected ')' before 'printf'
   13 |     if(op == '+'')
      |       ~         ^
      |                 )
   14 |         printf("%d¥n",a + b);
      |         ~~~~~~   
main.c:16:22: warning: missing terminating ' character
   16 |     else if(op == '-'')
      |                      ^
main.c:16:22: error: missing terminating ' character
   16 |     else if(op == '-'')
      |                      ^~
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
Language: C

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

    int a,b;
    char chr;
    
    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:8:26: error: 'op' undeclared (first use in this function)
    8 |     scanf("%d %c %d",&a,&op,&b);
      |                          ^~
main.c:8:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:9: error: break statement not within loop or switch
   10 |         break;
      |         ^~~~~
main.c:13:17: warning: missing terminating ' character
   13 |     if(op == '+'')
      |                 ^
main.c:13:17: error: missing terminating ' character
   13 |     if(op == '+'')
      |                 ^~
main.c:13:17: error: expected ')' before 'printf'
   13 |     if(op == '+'')
      |       ~         ^
      |                 )
   14 |         printf("%d¥n",a + b);
      |         ~~~~~~   
main.c:16:22: warning: missing terminating ' character
   16 |     else if(op == '-'')
      |                      ^
main.c:16:22: error: missing terminating ' character
   16 |     else if(op == '-'')
      |                      ^~
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
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;
    }
    
    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:10:9: error: break statement not within loop or switch
   10 |         break;
      |         ^~~~~
main.c:13:17: warning: missing terminating ' character
   13 |     if(op == '+'')
      |                 ^
main.c:13:17: error: missing terminating ' character
   13 |     if(op == '+'')
      |                 ^~
main.c:13:17: error: expected ')' before 'printf'
   13 |     if(op == '+'')
      |       ~         ^
      |                 )
   14 |         printf("%d¥n",a + b);
      |         ~~~~~~   
main.c:16:22: warning: missing terminating ' character
   16 |     else if(op == '-'')
      |                      ^
main.c:16:22: error: missing terminating ' character
   16 |     else if(op == '-'')
      |                      ^~
main.c:26:1: error: expected declaration or statement at end of input
   26 | }
      | ^
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);
			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:8:26: error: expected expression before '?' token
    8 |                 if(op == ?) break;
      |                          ^
main.c:11:35: error: expected expression before ')' token
   11 |                         if(op == -) printf("%d\n", a-b);
      |                                   ^
main.c:12:35: error: expected expression before ')' token
   12 |                         if(op == *) printf("%d\n", a*b);
      |                                   ^
main.c:13:34: error: expected expression before '/' token
   13 |                         if(op == /) printf("%d\n", a/b);
      |                                  ^
Language: C

// ITP1_4_C: Simple Calculator.c
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
 
int main()
{
    int a, b, x;
    char buf[256], *p;
    char op;
 
    for (;;) {
        gets(buf);
 
        p = buf;
        a = atoi(p);
        while (isspace(*p)) p++;
        while (isdigit(*p)) p++;
        while (isspace(*p)) p++;
        op = *p++;
        b = atoi(p);
 
        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:13:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
   13 |         gets(buf);
      |         ^~~~
      |         fgets
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{
			printf("%d\n",a/b);
		}
}


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


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,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;
        default : printf("?\n");
                  break;
      }
      scanf("%d%c%d", &a,&op, &b);
    }

    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    6 |     scanf("%d%c%d", &a,&op, &b);
      |     ^~~~~
main.c:7:11: error: 'op' undeclared (first use in this function)
    7 |     while(op=='?') {
      |           ^~
main.c:7:11: note: each undeclared identifier is reported only once for each function it appears in
Language: C



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


Compile Error Logs: 

 

ステータス 
Judge: 5/5 C CPU 



Compiler output:
main.c:3:20: warning: extra tokens at end of #include directive
    3 | #include <stdio.h> #include <string.h> int main(void) {
      |                    ^
main.c:4:22: error: expected identifier or '(' before 'for'
    4 | int a, b, i; char s; for (i = 0; i < 1000; i++) { scanf("%d %c %d", &a, &s, &b); if (s == '+') printf("%d\n", a + b); if (s == '-') printf("%d\n", a - b); if (s == '/') printf("%d\n", a / b); if (s == '*') printf("%d\n", a * b); if (s == '?') break; } return 0; }
      |                      ^~~
main.c:4:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    4 | int a, b, i; char s; for (i = 0; i < 1000; i++) { scanf("%d %c %d", &a, &s, &b); if (s == '+') printf("%d\n", a + b); if (s == '-') printf("%d\n", a - b); if (s == '/') printf("%d\n", a / b); if (s == '*') printf("%d\n", a * b); if (s == '?') break; } return 0; }
      |                                    ^
main.c:4:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    4 | int a, b, i; char s; for (i = 0; i < 1000; i++) { scanf("%d %c %d", &a, &s, &b); if (s == '+') printf("%d\n", a + b); if (s == '-') printf("%d\n", a - b); if (s == '/') printf("%d\n", a / b); if (s == '*') printf("%d\n", a * b); if (s == '?') break; } return 0; }
      |                                             ^~
main.c:4:253: error: expected identifier or '(' before 'return'
    4 | int a, b, i; char s; for (i = 0; i < 1000; i++) { scanf("%d %c %d", &a, &s, &b); if (s == '+') printf("%d\n", a + b); if (s == '-') printf("%d\n", a - b); if (s == '/') printf("%d\n", a / b); if (s == '*') printf("%d\n", a * b); if (s == '?') break; } return 0; }
      |                                                                                                                                                                                                                                                             ^~~~~~
main.c:4:263: error: expected identifier or '(' before '}' token
    4 | int a, b, i; char s; for (i = 0; i < 1000; i++) { scanf("%d %c %d", &a, &s, &b); if (s == '+') printf("%d\n", a + b); if (s == '-') printf("%d\n", a - b); if (s == '/') printf("%d\n", a / b); if (s == '*') printf("%d\n", a * b); if (s == '?') break; } return 0; }
      |                                                                                                                                                                                                                                                                       ^
main.c:7:1: error: unknown type name 'Compile'
    7 | Compile Error Logs:
      | ^~~~~~~
main.c:7:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Logs'
    7 | Compile Error Logs:
      |               ^~~~
Language: C



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


Compile Error Logs: 

 

ステータス 
Judge: 5/5 C CPU 



Compiler output:
main.c:3:20: warning: extra tokens at end of #include directive
    3 | #include <stdio.h> #include <string.h> int main(void) {
      |                    ^
main.c:5:9: error: expected identifier or '(' before 'for'
    5 | char s; for (i = 0; i < 1000; i++)
      |         ^~~
main.c:5:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    5 | char s; for (i = 0; i < 1000; i++)
      |                       ^
main.c:5:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    5 | char s; for (i = 0; i < 1000; i++)
      |                                ^~
main.c:11:25: error: expected identifier or '(' before 'return'
   11 |  if (s == '?') break; } return 0; }
      |                         ^~~~~~
main.c:11:35: error: expected identifier or '(' before '}' token
   11 |  if (s == '?') break; } return 0; }
      |                                   ^
main.c:14:1: error: unknown type name 'Compile'
   14 | Compile Error Logs:
      | ^~~~~~~
main.c:14:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Logs'
   14 | Compile Error Logs:
      |               ^~~~
Language: C



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





Compiler output:
main.c:3:20: warning: extra tokens at end of #include directive
    3 | #include <stdio.h> #include <string.h> int main(void) {
      |                    ^
main.c:5:9: error: expected identifier or '(' before 'for'
    5 | char s; for (i = 0; i < 1000; i++)
      |         ^~~
main.c:5:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    5 | char s; for (i = 0; i < 1000; i++)
      |                       ^
main.c:5:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    5 | char s; for (i = 0; i < 1000; i++)
      |                                ^~
main.c:11:25: error: expected identifier or '(' before 'return'
   11 |  if (s == '?') break; } return 0; }
      |                         ^~~~~~
main.c:11:35: error: expected identifier or '(' before '}' token
   11 |  if (s == '?') break; } return 0; }
      |                                   ^