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

#include <stdio.h>
#include <stdlib.h> /* for atof() */
#include<ctype.h>
#define NUMBER '0'
int getop(char []);
void push(double);
double pop(void);
double value[100];
int sp = 0;
char buf[100];
int bufp = 0;

int getch(void);
void ungetch(int);
main()
{
    int type;
    double op2;
    char s[100];
    while ((type = getop(s)) != EOF) {
        switch (type) {
            case NUMBER:
            push(atof(s));
            break;
            case '+':
            push(pop() + pop());
            break;
            case '*':
            push(pop() * pop());
            break;
            case '-':
            op2 = pop();
            push(pop() - op2);
            break; 
            case '\n':
            printf("%.8g\n", pop());
            break;
            default:
            break;
        }
    }
}
void push(double f)
{
    if(sp < 100)
        value[sp++]=f;
    else
        printf("error\n");
}

double pop(void)
{
    if(sp>0)
        return value[--sp];
    else
    {
        printf("error\n");
        return 0.0;
    }
}

int getop(char s[])
{
    int i,c;

    while((s[0] = c = getch()) == ' ' || c =='\t')
        ;
    s[1] = '\0';
    
    i = 0;
    if(!isdigit(c) && c!='.' && c!='-')
        return c;

    if(c=='-')
        if(isdigit(c=getch()) || c == '.')
            s[++i]=c;
        else
        {
            if(c!=EOF)
                ungetch(c);
            return '-';
        }
    
    if(isdigit(c))
        while(isdigit(s[++i] =c =getch()))
            ;

    if(c=='.')
        while(isdigit(s[++i] = c=getch()))
            ;
    
    s[i] = '\0';
    if(c!=EOF)
        ungetch(c);
    return NUMBER;
}


int getch(void)
{
    return (bufp > 0) ? buf[--bufp] : getchar();
}

void ungetch(int c)
{
    if(bufp >= 100)
        printf("error");
    else
        buf[bufp++] = c;
}
{
    int item;
    if(top == -1) // Checking Array is empty or not.
    {
    	return -1; 
    }
    item = stack[top];
    top -= 1; //	top = top - 1
    return item;
}



Compiler output:
main.c:15:1: error: return type defaults to 'int' [-Wimplicit-int]
   15 | main()
      | ^~~~
main.c:111:1: error: expected identifier or '(' before '{' token
  111 | {
      | ^
Language: C

#include <stdio.h>

int stack[10];
int size = 0;

int pop()
{
	return stack[--size];
}

int push(int a)
{
	stack[size++] = a;
}

int digit(char *s)
{
	if (*s == '+' || *s =='-') {
		s++;
		if (*s >= '0' && *s <= '9') return 1;
		return 0;
	}
	if (*s >= '0' && *s <= '9') return 1;
	return 0;
}

int get_number(char *s)
{
	int sign = 0,n = 0;
	
	if (*s == '+') {
		s++;
	} else if (*s == '-') {
		sign++;
		s++;
	}
	while (*s >= '0' && *s <= '9') {
		n = n * 10 + (*s - '0');
		s++;
	}
	if(sign) return -n;
	return n;
}

int calc_rpn(char *s)
{
	int a, b, n;
	
	while (*s) {
		
		if (digit(s)) {
			n = get_number(s);
			push(n);
			while (*s == '-' || *s == '+') {
				s++;
			}
			while (n) {
				n /= 10;
				s++;
			}
			
		}
		else{
			switch(*s){
			case '+':
				a = pop();
				b = pop();
				push(b+a);
				break;
			case '-':
				a = pop();
				b = pop();
				push(b-a);
				break;
			case '*':
				a = pop();
				b = pop();
				push(b*a);
				break;
			}
			s++;
		}
	}
	return pop();
}

int main()
{
	char s[100];
	scanf("%[^\n]*s", s);
	printf("%d\n",calc(s));
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:91:23: error: implicit declaration of function 'calc' [-Wimplicit-function-declaration]
   91 |         printf("%d\n",calc(s));
      |                       ^~~~
Language: C

#include<stdio.h>
#include<stdlib.h>

struct node{
  int key;
  struct node *prev, *next;
};

typedef struct node Node;

Node *nil;

void init(){
  nil = (Node *)malloc(sizeof(Node));
  nil->prev = nil;
  nil->next = nil;
}

void insert(int key){
  Node *x = (Node *)malloc(sizeof(Node));
  x->key = key;
  x->next = nil->next;
  nil->next->prev = x;
  nil->next = x;
  x->prev = nil;
}

Node* listSearch(int key){
  Node *cur = nil->next;
  while ( cur != nil && cur->key != key ){
    cur = cur->next;
  }
  return cur;
}

void deleteNode(Node *t){
  if (t == nil) return;
  t->prev->next = t->next;
  t->next->prev = t->prev;
  free(t);
}

void deleteFirst(){
  deleteNode(nil->next);
}

void deleteLast(){
  deleteNode(nil->prev);
}

void deleteKey(int key){
  deleteNode(listSearch(key));
}

int main(void){
  int n, i, a, b = 0;
  char s[100];
  scanf("%d",&n);
  init();
  for(i=0;i<n;i++){
    scanf("%s",s);
    if(s[0] == 'd'){
      if(s[6] == 'F') deleteFirst();
      else if(s[6] == 'L') deleteLast();
      else {
        scanf("%d",&a);
        deleteKey(a);
      }
    }
    else {
      scanf("%d",&a);
      insert(a);
      b++;
    }
  }
  printf("%d",nil->next->key);
  Node *c = nil->next->next;
  while(c != nil){
    printf(" %d",c->key);
    c = c->next;
  }
  printf("\n");
  return 0;
}
int main(void){
  int n, i, a, b = 0;
  char s[100];
  scanf("%d",&n);
  init();
  for(i=0;i<n;i++){
    scanf("%s",s);
    if(s[0] == 'd'){
      if(s[6] == 'F') deleteFirst();
      else if(s[6] == 'L') deleteLast();
      else {
        scanf("%d",&a);
        deleteKey(a);
      }
    }
    else {
      scanf("%d",&a);
      insert(a);
      b++;
    }
  }
  printf("%d",nil->next->key);
  Node *c = nil->next->next;
  while(c != nil){
    printf(" %d",c->key);
    c = c->next;
  }
  printf("\n");
  return 0;
}



Compiler output:
main.c:85:5: error: redefinition of 'main'
   85 | int main(void){
      |     ^~~~
main.c:55:5: note: previous definition of 'main' with type 'int(void)'
   55 | int main(void){
      |     ^~~~
Language: C

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

int top S[1000];

void push (int x){
  S[++top]=x;
}

int pop(){
  top--;
  return S[top+1];
}

int main(){
  int a,b;
  top=0;
  char s[100];

  while(scanf("%s",s)!=EOF){
    if (s[0]=='+'){
        a=pop();
        b=pop();
        push(a+b);
      }
    else if (s[0]=='-'){
          a=pop();
          b=pop();
          push(a-b);
        }
    else if (s[0:=='*'){
            a=pop();
            b=pop();
            push(a*b);
          }
      else {
        push(atoi(s));
      }
      
     }
    printf("%d\n",pop());
    return 0;
  }





Compiler output:
main.c:5:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'S'
    5 | int top S[1000];
      |         ^
main.c: In function 'push':
main.c:8:3: error: 'S' undeclared (first use in this function)
    8 |   S[++top]=x;
      |   ^
main.c:8:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:7: error: 'top' undeclared (first use in this function)
    8 |   S[++top]=x;
      |       ^~~
main.c: In function 'pop':
main.c:12:3: error: 'top' undeclared (first use in this function); did you mean 'pop'?
   12 |   top--;
      |   ^~~
      |   pop
main.c:13:10: error: 'S' undeclared (first use in this function)
   13 |   return S[top+1];
      |          ^
main.c: In function 'main':
main.c:18:3: error: 'top' undeclared (first use in this function); did you mean 'pop'?
   18 |   top=0;
      |   ^~~
      |   pop
main.c:32:17: error: expected ']' before ':' token
   32 |     else if (s[0:=='*'){
      |                 ^
      |                 ]
Language: C

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

int top S[1000]

void push (int x){
  S[++top]=x;
}

int pop(){
  top--;
  return S[top+1];
}

int main(){
  int a,b;
  top=0;
  char s[100];

  while(scanf("%s",s)!=EOF){
    if (s[0]=='+'){
        a=pop();
        b=pop();
        push(a+b);
      }
    else if (s[0]=='-'){
          a=pop();
          b=pop();
          push(a-b);
        }
    else if (s[0:=='*'){
            a=pop();
            b=pop();
            push(a*b);
          }
      else {
        push(atoi(s));
      }
      
     }
    printf("%d\n",pop());
    return 0;
  }





Compiler output:
main.c:5:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'S'
    5 | int top S[1000]
      |         ^
main.c: In function 'pop':
main.c:12:3: error: 'top' undeclared (first use in this function); did you mean 'pop'?
   12 |   top--;
      |   ^~~
      |   pop
main.c:12:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:10: error: 'S' undeclared (first use in this function)
   13 |   return S[top+1];
      |          ^
main.c: In function 'main':
main.c:18:3: error: 'top' undeclared (first use in this function); did you mean 'pop'?
   18 |   top=0;
      |   ^~~
      |   pop
main.c:25:9: error: implicit declaration of function 'push' [-Wimplicit-function-declaration]
   25 |         push(a+b);
      |         ^~~~
main.c:32:17: error: expected ']' before ':' token
   32 |     else if (s[0:=='*'){
      |                 ^
      |                 ]
Language: C

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

int top, S[1000];

void push (int x){
  S[++top]=x;
}

int pop(){
  top--;
  return S[top+1];
}

int main(){
  int a,b;
  top=0;
  char s[100];

  while(scanf("%s",s)!=EOF){
    if (s[0]=='+'){
        a=pop();
        b=pop();
        push(a+b);
      }
    else if (s[0]=='-'){
          a=pop();
          b=pop();
          push(a-b);
        }
    else if (s[0:=='*'){
            a=pop();
            b=pop();
            push(a*b);
          }
      else {
        push(atoi(s));
      }
      
     }
    printf("%d\n",pop());
    return 0;
  }





Compiler output:
main.c: In function 'main':
main.c:32:17: error: expected ']' before ':' token
   32 |     else if (s[0:=='*'){
      |                 ^
      |                 ]
Language: C

#include<stdio.h>
int main(){
  int val1,val2,ans;
  char type;
  switch(type){
  case +:
    ans=val1+val2;
    break;
  case -:
    ans=val1-val2;
    break;
  case *:
    ans=val1*val2;
    break;
  }
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:6:9: error: expected expression before ':' token
    6 |   case +:
      |         ^
main.c:9:9: error: expected expression before ':' token
    9 |   case -:
      |         ^
main.c:12:9: error: expected expression before ':' token
   12 |   case *:
      |         ^
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){

  int i=0,b[10000];
  char a[10000];
  
  while( (scanf("%s",a)) != EOF){

    if(a[0] > '0' && a[0] < '9'){
    

      b[i] = atoi(a);
      i++;
    }

    else if(a[0] == '+'){
      b[i-2] = b[i-2] + b[i-1];
      i--;
    
    }

    
    else if(a[0] == '-'){
      b[i-2] = b[i-2] - b[i-1];
      i--;
    }

    
    else if(a[0] == '*'){
   
      b[i-2] = b[i-2] * b[i-1];
      i--;
      
    }


  
  printf("%d\n",b[i-1]);




  return 0;
}



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

import java.io.*;

class PA
{

    public static void main(String args[])
    {
	try
	    {
		int stack[]=new int[100];
		int j=0;
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

		String str = reader.readLine();
		String[] processed = str.split(" ",0);
		//for(int i= 0 ; i <processed.length ; i++)System.out.println(processed[i]);
		for(int i= 0 ; i <processed.length ; i++)
		    {
			if(processed[i].equals("+"))//equals("")はダブルクオーテーション" "の見た目と変数.equals(" ")の変数の中身が一致すればtrue、一致しなければfalse。半角全角とかが違っても見た目同じならtrue。
			    {
				//System.out.println("test");
				//System.out.println(stack[j-1]+" "+stack[j]);
				stack[j-2] = stack[j-2]+stack[j-1];
				/*System.out.println(stack[j]);
				System.out.println(stack[j-1]);
				System.out.println(stack[j+1]);*/
				j--;
			    }
			else if(processed[i].equals("-"))
			    {
				
				stack[j-2] = stack[j-2]-stack[j-1];
				j--;
			    }
			else if(processed[i].equals("*"))
			    {
				stack[j-2] = stack[j-2] * stack[j-1];
				j--;
			    }
			else if(processed[i].equals("/"))
			    {
				stack[j-2] = stack[j-2]/stack[j-1];
				j--;
			    }
			else
			    {
				stack[j] = Integer.parseInt(processed[i]);
				//System.out.println("stack["+j+"]="+stack[j]);
				j++;
				//for(int k = 0 ; k < j ; k++)System.out.println("stack["+k+"]="+stack[k]);
				//System.out.println("j = "+j);
				//System.out.println("");
			    }
		    }
		//for(int i = 0 ; i< processed.length ; i++)System.out.print(processed[i]+" ");

		//for(int k = 0 ; k < j ; k++)System.out.println("stack["+k+"]="+stack[k]);
		System.out.println(stack[0]);
		    
	    }
	catch(IOException e)
	    {
		System.out.println(e);
	    }
    }
    
}



Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.io.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.io.*;
      |            ^
main.c:3:1: error: unknown type name 'class'
    3 | class PA
      | ^~~~~
main.c:4:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    4 | {
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>

int main(){
    int x,i=0;
    char s[100];
  
while(scanf("%s",s) != EOF )
      if ( s[i] == '+' ){
        s[0] = s[0] + s[1];
        

    } else if ( s[0] == '-' ){

    } else if ( s[0] == '*' ){
        
    } else {
      x[i] = atoi(s);
      s++;
      i++;
    }
  }

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:18:8: error: subscripted value is neither array nor pointer nor vector
   18 |       x[i] = atoi(s);
      |        ^
main.c:19:8: error: lvalue required as increment operand
   19 |       s++;
      |        ^~
main.c: At top level:
main.c:24:3: error: expected identifier or '(' before 'return'
   24 |   return 0;
      |   ^~~~~~
main.c:25:1: error: expected identifier or '(' before '}' token
   25 | }
      | ^
Language: C

#include <stdlib.h>
#include <string.h>

int * Include_Number(char *);

#define MAX 398
int main() {
  char stack[MAX];
  int i,j=0;
  int number[100] = {};
  int num;
  int len_number=0;
  char type[99];
  int len_stack;
  int result=0;
  int res[100]={};
  int s=0,t;

  //一行の入力
  fgets(stack,MAX,stdin);
  //printf("%s\n",stack);
  len_stack = strlen(stack);
  //printf("%d\n",len_stack);

  for(i=0;i<len_stack;i++) {
    if(stack[i] >=48 && stack[i] <= 57 && stack[i+1] == ' ') {
      number[j] = atoi(&stack[i]);
      j++;
    } else
     if(stack[i] >=48 && stack[i] <= 57 && stack[i+1] != ' ') {
       //printf("check\n");
      number[j] = atoi(&stack[i]);
      num = number[j];
      //桁数が２桁以上の場合、それを一つに格納したあと、次の空\\
白まで飛ぶ
      while(num!=0) {
        num = num / 10;
        len_number++; //桁数
      }
      i+=len_number;
      j++;
    }
    //桁数を０に戻す
    len_number=0;

    //printf("%d ",i);

    t=j;//見ている箱
    //printf("%d;%d\n",i,t);
    switch(stack[i]) {
    case 43: //"+"
      //printf("%d;%d\n",i,t);
        number[t-2] += number[t-1];
        number[t-1] = 0;
        //number[t] = 0;
      j-=1;
      break;
    case 45: //"-"
      //printf("%d;%d\n",i,t);
        number[t-2] -= number[t-1];
        number[t-1] = 0;
        //number[t] = 0;
      j-=1;
      break;
    case 42: //"*"
      //printf("%d;%d\n",i,t);
        number[t-2] *= number[t-1];
        number[t-1] = 0;
        //number[t] = 0;
      j-=1;
      break;
    case 47: //"/"
      //printf("%d;%d\n",i,t);
        number[t-2] /= number[t-1];
        number[t-1] = 0;
        //number[t] = 0;
      j-=1;
      break;
    }
  }


  printf("%d\n",number[0]);

  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:20:3: error: implicit declaration of function 'fgets' [-Wimplicit-function-declaration]
   20 |   fgets(stack,MAX,stdin);
      |   ^~~~~
main.c:20:19: error: 'stdin' undeclared (first use in this function)
   20 |   fgets(stack,MAX,stdin);
      |                   ^~~~~
main.c:3:1: note: 'stdin' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
    2 | #include <string.h>
  +++ |+#include <stdio.h>
    3 | 
main.c:20:19: note: each undeclared identifier is reported only once for each function it appears in
   20 |   fgets(stack,MAX,stdin);
      |                   ^~~~~
main.c:83:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   83 |   printf("%d\n",number[0]);
      |   ^~~~~~
main.c:83:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:83:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:83:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

import java.util.*;
import java.io.*;

class Main{
    public static void main(String[] args) throws IOException{
	Scanner S=new Scanner(System.in);
	int i,n,m,t=0;
	Queue<String>P=new LinkedList<String>();
	Queue<Integer>T=new LinkedList<Integer>();
	n=S.nextInt();
	m=S.nextInt();
	for(i=0;i<n;i++){
	    P.add(S.next());
	    T.add(S.nextInt());
	}
	while(0<P.size()){
	    if(0<(T.peek()-m)){
		P.add(P.poll());
		T.add(T.poll()-m);
		t=t+m;
	    }
	    else{
		t=t+T.poll();
		System.out.println(P.poll()+" "+t);
	    }
	}
    }
}
	
			      



Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.*;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.io.*;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.io.*;
      |            ^
main.c:4:1: error: unknown type name 'class'
    4 | class Main{
      | ^~~~~
main.c:4:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    4 | class Main{
      |           ^
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct pop{

    char name[100];
    int s;
} POP;

POP Q[LEN];
int head,tail,n;

void enq(POP x){

    Q[tail] = x;
    tail = (tail + 1) % LEN;

}

POP deq(){

    POP x = Q[head];
    head = (head + 1) % LEN;
    return x;
}

int min(){

    int laps = 0;
    int i,a,q;
    POP r;

    scanf("%d %d",&n,&q;);

    for(i=1;i<=n;i++){

        scanf("%s",Q[i].name);
        scanf("%d"Q[i].s);
    }

    head = 1;
    tail = n + 1;

    while(head != tail){

        r = deq();
        a = min(q,r.s);

        r.s -= a;
        laps += a;

        if(r.s>0)
        enq(r);

        else{
            printf("%s %d\n",r.name,laps);
        }

    }
    return 0;
}


Compiler output:
main.c: In function 'min':
main.c:34:24: error: expected ')' before ';' token
   34 |     scanf("%d %d",&n,&q;);
      |          ~             ^
      |                        )
main.c:39:19: error: expected ')' before 'Q'
   39 |         scanf("%d"Q[i].s);
      |              ~    ^
      |                   )
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct pop{

    char name[100];
    int s;
} POP;

POP Q[LEN];
int head,tail,n;

void enq(POP x){

    Q[tail] = x;
    tail = (tail + 1) % LEN;

}

POP deq(){

    POP x = Q[head];
    head = (head + 1) % LEN;
    return x;
}

int min(int a,int b){

    if(a<b)
    return a;

    else
    return b;
}

int main(){

    int laps = 0;
    int i,a,q;
    POP r;

    scanf("%d %d",&n,&q;);

    for(i=1;i<=n;i++){

        scanf("%s",Q[i].name);
        scanf("%d"Q[i].s);
    }

    head = 1;
    tail = n + 1;

    while(head != tail){

        r = deq();
        a = min(q,r.s);

        r.s -= a;
        laps += a;

        if(r.s>0)
        enq(r);

        else{
            printf("%s %d\n",r.name,laps);
        }

    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:43:24: error: expected ')' before ';' token
   43 |     scanf("%d %d",&n,&q;);
      |          ~             ^
      |                        )
main.c:48:19: error: expected ')' before 'Q'
   48 |         scanf("%d"Q[i].s);
      |              ~    ^
      |                   )
Language: C

#include<stdio.h>
#include<string.h>
#define LEN 100005

typedef struct pop{

    char name[100];
    int s;
} POP;

POP Q[LEN];
int head,tail,n;

void enq(POP x){

    Q[tail] = x;
    tail = (tail + 1) % LEN;

}

POP deq(){

    POP x = Q[head];
    head = (head + 1) % LEN;
    return x;
}

int min(int a,int b){

    if(a<b)
    return a;

    else
    return b;
}

int main(){

    int laps = 0;
    int i,a,q;
    POP r;

    scanf("%d %d",&n,&q);

    for(i=1;i<=n;i++){

        scanf("%s",Q[i].name);
        scanf("%d"Q[i].s);
    }

    head = 1;
    tail = n + 1;

    while(head != tail){

        r = deq();
        a = min(q,r.s);

        r.s -= a;
        laps += a;

        if(r.s>0)
        enq(r);

        else{
            printf("%s %d\n",r.name,laps);
        }

    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:48:19: error: expected ')' before 'Q'
   48 |         scanf("%d"Q[i].s);
      |              ~    ^
      |                   )
Language: C

import java.util.*;
import java.io.*;

class Main{
    public static void main(String[] args) throws IOException{
	Scanner scan = new Scanner(System.in);
	int n = scan.nextInt();
	int reg = scan.nextInt();
	Queue<String> method = new LinkedList<String>();
	Queue<Integer> time = new LinkedList<Integer>();
	int i;
	int time0=0;
	for(i=0 ; i<n ; i++){
	    method.add(scan.next());
	    time.add(scan.nextInt());
	}

	while(method.size()>0){
	    if(time.peek() - reg>0){
		method.add(method.poll());
		time.add(time.poll() - reg);
		time0+=reg;
	    }

	    
	    else{
		time0+=time.poll();
		System.out.println(method.poll() + " " +time0);
	    }
	}
    }
}
		
	    



Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.*;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.io.*;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.io.*;
      |            ^
main.c:4:1: error: unknown type name 'class'
    4 | class Main{
      | ^~~~~
main.c:4:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    4 | class Main{
      |           ^
Language: C

#define N '\0'
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int getop(char []);
void push(double);
double pop(void);

int main()
{
  char s[100];
  int w;
  double op;

  while((w = getop(s)) != EOF && w < 100) {
    switch (w) {
    case '0':
      push(atof(s));
      break;
      
    case '+':
      push(pop() + pop());
      break;
      
    case '*':
      push(pop() * pop());
      break;
      
    case '-':
      op = pop();
      push(pop() - op);
      break;
      
    case '\n':
      printf("%.8g\n", pop());
      break;
      
    default:
      printf("error: unknown command %s\n", s);
      break;
    }
  }
  return 0;
}

double V[100];
int sp = 0;

void push(double f)
{
  if (sp < 100)
    V[sp++] = f;
  else
    printf("error: stack full, can't push %g\n", f);
}

double pop(void)
{
  if (sp > 0)
    return V[--sp];
  else {
    printf("error: stack empty\n");
    return 0.0;
  }
}

#include <ctype.h>

int getch(void);
void ungetch(int);

int getop(char argv[])
{
  int i,x;

  while ((argv[0]= x = getch()) == ' ' || x == '\t')
    
  argv[1] = N;
  if (!isdigit(x) && x != '.')
    return x;
  
  i = 0;
  if (isdigit(x))
    while (isdigit(argv[++i] = x = getch()))
      
  if (x == '.')
    while (isdigit(argv[++i] = x = getch()))
      
  argv[i] = N;
  if (x != EOF)
    ungetch(c);
  
  return '0';
}

char buf[100];
int bp = 0;

int getch(void)
{
  return (bp > 0) ? buf[--bp] : getchar();
}

void ungetch(int x)
{
  if (bp >= 100)
    printf("ungetch: too many characters\n");
  else
    buf[bp++] = x;
}



Compiler output:
main.c: In function 'getop':
main.c:92:13: error: 'c' undeclared (first use in this function)
   92 |     ungetch(c);
      |             ^
main.c:92:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

void push(int);
int pup();

int atama;
int A[199];

int main(int argc, char *argv[]){
  int x,y;
  char a[100];
  
  atama=0;
  
  while(scanf("%s",a)!=EOF){
    if(a[0]=='+'){
      x=pop();
      y=pop();
      push(x+y);
    }
    else if(a[0]=='-'){
      y=pop();
      x=pop();
      push(x-y);
    }
    else if(a[0]=='*'){
      x=pop();
      y=pop();
      push(x*y);
    }
    else {
      push(atoi(s));
    }
  }

  printf("%d\n",pop());

  return 0;

}

void push(int a){
  A[++atama]=x;
}

int pop(){
  atama--;
  return A[atama+1];
}
    



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

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

void push(int);
int pup();

int atama;
int A[199];

int main(int argc, char *argv[]){
  int x,y;
  char a[100];
  
  atama=0;
  
  while(scanf("%s",a)!=EOF){
    if(a[0]=='+'){
      x=pop();
      y=pop();
      push(x+y);
    }
    else if(a[0]=='-'){
      y=pop();
      x=pop();
      push(x-y);
    }
    else if(a[0]=='*'){
      x=pop();
      y=pop();
      push(x*y);
    }
    else {
      push(atoi(s));
    }
  }

  printf("%d\n",pop());

  return 0;

}

void push(int a){
  A[++atama]=x;
}

int pop(){
  atama--;
  return A[atama+1];
}
    



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

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

void push(int);
int pup();

int atama;
int A[199];

int main(int argc, char *argv[]){
  int x,y;
  char a[100];
  
  atama=0;
  
  while(scanf("%s",a)!=EOF){
    if(a[0]=='+'){
      x=pop();
      y=pop();
      push(x+y);
    }
    else if(a[0]=='-'){
      y=pop();
      x=pop();
      push(x-y);
    }
    else if(a[0]=='*'){
      x=pop();
      y=pop();
      push(x*y);
    }
    else {
      push(atoi(s));
    }
  }

  printf("%d\n",pop());

  return 0;

}

void push(int a){
  A[++atama]=x;
}

int pop(){
  atama--;
  return A[atama+1];
}
    



Compiler output:
main.c: In function 'main':
main.c:20:9: error: implicit declaration of function 'pop'; did you mean 'pup'? [-Wimplicit-function-declaration]
   20 |       x=pop();
      |         ^~~
      |         pup
main.c:35:17: error: 's' undeclared (first use in this function)
   35 |       push(atoi(s));
      |                 ^
main.c:35:17: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'push':
main.c:46:14: error: 'x' undeclared (first use in this function)
   46 |   A[++atama]=x;
      |              ^
Language: C

#include<stdio.h>
#include<stdlib.h>

int pop();
void push(int);
int stack[2000];
int kazu=0;
void push(int j){
  stack[kazu++]=j;
}
int pop(){
  if(kazu<=0) return 0;
  return stack[--kazu];
}

int main(){
  int i,j,k=0,l,n,Ans;
  char s[100];
  while(scanf("%s",s)!=EOF){
    if(s[0]=='+'){
      l=pop();
      n=pop();
      Ans=l+n;
      push(Ans);
    }
    else if(s[0]=='-'){
      l=pop();
      n=pop();
      Ans=n-l;
      push(Ans);
    }
    else if(s[0]=='*'){
      l=pop();
      n=pop();
      Ans=l*n;
      push(Ans);
    }
    else{
      j=atoi(s);
      push(j);
    }
  }
  Ans=pop();
  printf("%d\n",Ans);
  return 0;


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

import java.util.*;
import java.io.*;

class queue{
    public static void main(String[] args) throws IOException{
	Scanner s=new Scanner(System.in);
	int i,n,m,gt=0;

	Queue<String>q=new LinkedList<String>();
	Queue<Integer>time=new LinkedList<Integer>();

	n=s.nextInt();
	m=s.nextInt();

	for(i=0;i<n;i++){
	    q.add(s.next());
	    time.add(s.nextInt());
	}

	while(0<q.size()){
	    if(0<(time.peek()-m)){
		q.add(q.poll());
		time.add(time.poll()-m);
		gt=gt+m;
	    }
	    else{
		gt=gt+time.poll();
		System.out.println(q.poll()+" "+gt);
	    }
	}
    }
}



Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.*;
      |            ^
main.c:2:1: error: unknown type name 'import'
    2 | import java.io.*;
      | ^~~~~~
main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    2 | import java.io.*;
      |            ^
main.c:4:1: error: unknown type name 'class'
    4 | class queue{
      | ^~~~~
main.c:4:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    4 | class queue{
      |            ^
Language: C

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

typedef struct {
    char name[10];
    int time;
} process_t;

typedef struct {
    int front, rear, queue_size;
    process_t *elements;
} queue;

void SetProcess(process_t *p, char *name, int time){
    strcpy(p->name, name);
    p->time = time;
    return;
}

void InitQueue(queue *q, int ps){
    q->front = 0;
    q->rear = 0;
    q->queue_size = ps;
    return;
}

void Putq(queue *q, process_t p){
    q->elements[q->rear] = p;
    if(q->rear == q->queue_size){
        q->rear = 0;
    } else{
        q->rear += 1;
    }
    return;
}

process_t Getq(queue *q){
    process_t p;
    p = q->elements[q->front];
    if(q->front == q->queue_size){
        q->front = 0;
    } else{
        q->front += 1;
    }
  }
return p;
}

int QueueEmpty(queue *q){
return (q->front == q->rear);
}

int main(){
int i;
int ps,quantum,time,total_time;
char name[10];
process_t process;
queue q;


scanf("%d %d", &ps, &quantum);
InitQueue(&q, ps);
q.elements = (process_t *)malloc(sizeof(process_t)*(ps+1));
for(i = 0; i < ps; i++){
  scanf("%s %d", name, &time);
  SetProcess(&process, name, time);
  Putq(&q, process);
}


while(!QueueEmpty(&q)){
  process = Getq(&q);
  if(process.time <= quantum){
      total_time += process.time;
      printf("%s %d\n", process.name, total_time);
  } else{
      process.time -= quantum;
      total_time += quantum;
      Putq(&q, process);
  }
}

free(q.elements);
return 0;
}



Compiler output:
main.c:47:1: error: expected identifier or '(' before 'return'
   47 | return p;
      | ^~~~~~
main.c:48:1: error: expected identifier or '(' before '}' token
   48 | }
      | ^
Language: C

#include <bits/stdc++.h>
using namespace std;
stack<int> s;
char op[3333];
int main(){
    gets(op);
    int len = strlen(op);
    int n = 0;
    for(int i = 0; i < len; i++){
        if(op[i] >= '0' && op[i] <= '9'){
            n = n*10 + (op[i]-'0');
        }
        else if(op[i] == ' ' && op[i-1] >= '0' && op[i-1] <= '9'){
            s.push(n);
            n = 0;
        }
        else if(op[i] == '+' || op[i] == '-' || op[i] == '*' || op[i] == '/'){
            int y = s.top();
            s.pop();
            int x = s.top();
            s.pop();
            if(op[i] == '+'){
                s.push(x+y);
            }
            else if(op[i] == '-'){
                s.push(x-y);
            }
            else if(op[i] == '*'){
                s.push(x*y);
            }
            else if(op[i] == '/'){
                s.push(x/y);
            }
        }
    }
    cout << s.top();
}



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

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

int top, S[1000];

void push(int x) {
	S[++top] = x;
}
int pop() {
	top--;
	return S[top+1];
}

int main() {
	int a, b;
	top = 0;
	char s[100];
	while( scanf("%s", s) ! = EOF ) {
		if( s[0] == '+' ) {
		a = pop();
		b = pop();
		push(a + b);
		} else if ( s[0] == '-' ) {
		b = pop();
		a = pop();
		push(a - b);
		} else if ( s[0] == '*' ) {
		a = pop();
		b = pop();
		push(a * b);
		} else {
		push(atoi(s));
		}
	}
	printf("%d\n", pop());
	return 0;
}



Compiler output:
main.c: In function 'main':
main.c:19:30: error: expected ')' before '!' token
   19 |         while( scanf("%s", s) ! = EOF ) {
      |              ~               ^~
      |                              )
Language: C

#include<stdio.h>
int main(void){
  int i;
  char A[100];
  for(i=0;;i++){
    if(scanf("%c ",&A[i])==EOF)break;

   if(A[i]=='+'){
      i=i-2;
      if(A[i]>48){
	A[i]=A[i]-48;
      }
       if(A[i+1]>48){
	A[i+1]=A[i+1]-48;
      }
     
      A[i]=A[i+1]+A[i];


   }
    if(A[i]=='-'){
      i=i-2;
      if(A[i]>48){
	A[i]=A[i]-48;
      }
       if(A[i+1]>48){
	A[i+1]=A[i+1]-48;
      }
          A[i]=A[i]-A[i+1];


    }
    f(A[i]=='*'){
      i=i-2;
       if(A[i]>48){
	A[i]=A[i]-48;
      }
       if(A[i+1]>48){
	A[i+1]=A[i+1]-48;
      }
  
      A[i]=A[i+1]*A[i];



   }
  }


  printf("%d\n",A[i-1]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:33:5: error: implicit declaration of function 'f' [-Wimplicit-function-declaration]
   33 |     f(A[i]=='*'){
      |     ^
main.c:33:17: error: expected ';' before '{' token
   33 |     f(A[i]=='*'){
      |                 ^
      |                 ;
Language: C

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

void push(int);
int pop(void);

  int count=0;
  int stack[100];


int main(void){

  int x;
  int a,b;
  int i;
  char s[100];

  while( scanf("%s", s) != EOF ){
    
    for(i=0;s[i]!='\0';i++){
 
      if ( s[i] == '+' ){
	a = pop();
	b = pop();
	push(b + a);
      } 

      else if ( s[i] == '-' ){
	a = pop();
	b = pop();
	push(b - a);
      } 

      else if ( s[i] == '*' ){
	a = pop();
	b = pop();
	push(b * a);
      } 

      else {
	x = atoi(s);
	push(x);
      }
    }
  }
  
  printf("%d\n",stack[0]);

  return 0;
}


void push(int x){

  stack[count++] = x;

}

Compiler output:
/usr/bin/ld: /tmp/ccZI02nI.o: in function `main':
main.c:(.text+0x28): undefined reference to `pop'
/usr/bin/ld: main.c:(.text+0x30): undefined reference to `pop'
/usr/bin/ld: main.c:(.text+0x57): undefined reference to `pop'
/usr/bin/ld: main.c:(.text+0x5f): undefined reference to `pop'
/usr/bin/ld: main.c:(.text+0x84): undefined reference to `pop'
/usr/bin/ld: /tmp/ccZI02nI.o:main.c:(.text+0x8c): more undefined references to `pop' follow
collect2: error: ld returned 1 exit status
Language: C

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

stack<int> s;

int calc(string str){
    int x = s.top();
    s.pop();
    int y = s.top();
    s.pop();
    
    switch(str[0]){
        case '+':
            return x+y;
        case '-':
            return y-x;
        case '*':
            return x*y;
        case '/':
            return y/x;
    }
    return 0;
}

void judge(){
    string str;
    
    while(cin >> str){
        if(str=="+"||str=="-"||str=="*"||str=="/"){
            s.push(calc(str));
        }
        else{
            s.push(atoi(str.c_str()));
        }
    }
    cout << s.top() << endl;
}


int main(){
    judge();
    return 0;
}

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


  if(sp > 0) return value[--sp];
  else
    {
      printf("error. stuck empty.\n");
      return 0;
    }
}

int main(){
  int x;
  char s[100];

Compiler output:
main.c:2:3: error: expected identifier or '(' before 'if'
    2 |   if(sp > 0) return value[--sp];
      |   ^~
main.c:3:3: error: expected identifier or '(' before 'else'
    3 |   else
      |   ^~~~
main.c:8:1: error: expected identifier or '(' before '}' token
    8 | }
      | ^
main.c: In function 'main':
main.c:12:3: error: expected declaration or statement at end of input
   12 |   char s[100];
      |   ^~~~
Language: C

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

int main(){
  int x[100],i=1;
  char s[100];
  
  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
      x[i-2]=x[i-2]+ x[i-1];
      i=i-2;
    } else if ( s[0] == '-' ){
      x[i-2]=x[i-2]- x[i-1];
      i=i-2;
    } else if ( s[0] == '*' ){
      x[i-2]=x[i-2]* x[i-1];
      i=i-2;
    } else {
      x[i] = atoi(s);
    }
    i++;
  }
  printf("%d\n", x[1]);
  
  return 0;

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

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

int main(){
  int x, key=0;
  int stack[100];
  char s[100];

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
		number[key-1] = number[key] + number[key-1];

    } else if ( s[0] == '-' ){
		number[key-1] = number[key] - number[key-1];

    } else if ( s[0] == '*' ){
		number[key-1] = number[key] * number[key-1];

    } else {
      x = atoi(s);
      key++;
      number[key] = x;
    }
  }
  printf("%s\n",number[0]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:17: error: 'number' undeclared (first use in this function)
   12 |                 number[key-1] = number[key] + number[key-1];
      |                 ^~~~~~
main.c:12:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(){
  int x, key=0;
  int stack[100];
  char s[100];

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
		number[key-1] = number[key] + number[key-1];
                key--;

    } else if ( s[0] == '-' ){
		number[key-1] = number[key] - number[key-1];
                key--;

    } else if ( s[0] == '*' ){
		number[key-1] = number[key] * number[key-1];
                key--;

    } else {
      x = atoi(s);
      key++;
      number[key] = x;
    }
  }
  printf("%s\n",number[0]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:17: error: 'number' undeclared (first use in this function)
   12 |                 number[key-1] = number[key] + number[key-1];
      |                 ^~~~~~
main.c:12:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(){
  int x, key=0;
  int stack[100];
  char s[100];

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
		number[key-1] = number[key] + number[key-1];
                key--;

    } else if ( s[0] == '-' ){
		number[key-1] = number[key] - number[key-1];
                key--;

    } else if ( s[0] == '*' ){
		number[key-1] = number[key] * number[key-1];
                key--;

    } else {
      
    }
  }
  printf("%s\n",number[0]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:17: error: 'number' undeclared (first use in this function)
   12 |                 number[key-1] = number[key] + number[key-1];
      |                 ^~~~~~
main.c:12:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(){
  int x, key=0;
  int stack[100];
  char s[100];

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
		
    } else if ( s[0] == '-' ){
		number[key-1] = number[key] - number[key-1];
                key--;

    } else if ( s[0] == '*' ){
		number[key-1] = number[key] * number[key-1];
                key--;

    } else {
      x = atoi(s);
      key++;
      number[key] = x;
    }
  }
  printf("%s\n",number[0]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:17: error: 'number' undeclared (first use in this function)
   14 |                 number[key-1] = number[key] - number[key-1];
      |                 ^~~~~~
main.c:14:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(){
  int x, key=0;
  int stack[100];
  char s[100];

 
  printf("%s\n",number[0]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: 'number' undeclared (first use in this function)
   11 |   printf("%s\n",number[0]);
      |                 ^~~~~~
main.c:11:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(){
  int x, key=0;
  int stack[100];
  char s[100];

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
		number[key-1] = number[key] + number[key-1];
                key--;

    } else if ( s[0] == '-' ){
		number[key-1] = number[key] - number[key-1];
                key--;

    } else if ( s[0] == '*' ){
		number[key-1] = number[key] * number[key-1];
                key--;

    } else {
      x = atoi(s);
      key++;
      number[key] = x;
    }
  }
  

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:17: error: 'number' undeclared (first use in this function)
   12 |                 number[key-1] = number[key] + number[key-1];
      |                 ^~~~~~
main.c:12:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(){
  

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
		number[key-1] = number[key] + number[key-1];
                key--;

    } else if ( s[0] == '-' ){
		number[key-1] = number[key] - number[key-1];
                key--;

    } else if ( s[0] == '*' ){
		number[key-1] = number[key] * number[key-1];
                key--;

    } else {
      x = atoi(s);
      key++;
      number[key] = x;
    }
  }
  printf("%s\n",number[0]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:22: error: 's' undeclared (first use in this function)
    8 |   while( scanf("%s", s) != EOF ){
      |                      ^
main.c:8:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:17: error: 'number' undeclared (first use in this function)
   10 |                 number[key-1] = number[key] + number[key-1];
      |                 ^~~~~~
main.c:10:24: error: 'key' undeclared (first use in this function); did you mean 'key_t'?
   10 |                 number[key-1] = number[key] + number[key-1];
      |                        ^~~
      |                        key_t
main.c:22:7: error: 'x' undeclared (first use in this function)
   22 |       x = atoi(s);
      |       ^
Language: C

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

int main(){
  int x, key=0;
  int stack[100];
  char s[100];

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
		number[key-1] = number[key] + number[key-1];
                key--;

    } else if ( s[0] == '-' ){
		number[key-1] = number[key] - number[key-1];
                key--;

    } else if ( s[0] == '*' ){
		number[key-1] = number[key] * number[key-1];
                key--;

    } else {
      x = atoi(s);
      key++;
      number[key] = x;
    }
  }
  printf("%s\n",stack[0]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:17: error: 'number' undeclared (first use in this function)
   12 |                 number[key-1] = number[key] + number[key-1];
      |                 ^~~~~~
main.c:12:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

int main(){
  int x, key=0;
  int stack[100];
  char s[100];

  while( scanf("%s", s) != EOF ){
    if ( s[0] == '+' ){
		stack[key-1] = stack[key] + stack[key-1];
                key--;

    } else if ( s[0] == '-' ){
		stack[key-1] = stack[key] - stack[key-1];
                key--;

    } else if ( s[0] == '*' ){
		stack[key-1] = stack[key] * stack[key-1];
                key--;

    } else {
      x = atoi(s);
      key++;
      number[key] = x;
    }
  }
  printf("%s\n",stack[0]);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:26:7: error: 'number' undeclared (first use in this function)
   26 |       number[key] = x;
      |       ^~~~~~
main.c:26:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define N 100
int main(){
int i=0,x[N],j=0;
char a[N];

while (scanf("%s",a)!=EOF){

    if ( a[i] == '+' ){
j--;
x[j-1]=x[j-1]+x[j];
    } else if ( a[i] == '-' ){
j--;
x[j-1]=x[j-1]-x[j];
    } else if ( a[i] == '*' ){
j--;
x[j-1]=*x[j]
    } else {
      x[j] = atoi(s);
j++;
    }
i++;
  }
printf("%d\n",x[0]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:8: error: invalid type argument of unary '*' (have 'int')
   19 | x[j-1]=*x[j]
      |        ^~~~~
main.c:19:13: error: expected ';' before '}' token
   19 | x[j-1]=*x[j]
      |             ^
      |             ;
   20 |     } else {
      |     ~        
main.c:21:19: error: 's' undeclared (first use in this function)
   21 |       x[j] = atoi(s);
      |                   ^
main.c:21:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define N 100
int main(){
int i=0,x[N],j=0;
char a[N];

while (scanf("%s",a)!=EOF){

    if ( a[i] == '+' ){
j--;
x[j-1]=x[j-1]+x[j];
    } else if ( a[i] == '-' ){
j--;
x[j-1]=x[j-1]-x[j];
    } else if ( a[i] == '*' ){
j--;
x[j-1]=*x[j];
    } else {
      x[j] = atoi(s);
j++;
    }
i++;
  }
printf("%d\n",x[0]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:8: error: invalid type argument of unary '*' (have 'int')
   19 | x[j-1]=*x[j];
      |        ^~~~~
main.c:21:19: error: 's' undeclared (first use in this function)
   21 |       x[j] = atoi(s);
      |                   ^
main.c:21:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define N 100
int main(){
int i=0,x[N],j=0;
char a[N];

while (scanf("%s",a)!=EOF){

    if ( a[i] == '+' ){
j--;
x[j-1]=x[j-1]+x[j];
    } else if ( a[i] == '-' ){
j--;
x[j-1]=x[j-1]-x[j];
    } else if ( a[i] == '*' ){
j--;
x[j-1]=*x[j];
    } else {
      x[j] = atoi(a);
j++;
    }
i++;
  }
printf("%d\n",x[0]);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:8: error: invalid type argument of unary '*' (have 'int')
   19 | x[j-1]=*x[j];
      |        ^~~~~