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

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

int main()
{
    int num;
    
    while(1)
    {
      scanf("%d",num);
      if(num==0)break;
      int i;
      int *a,*b;
      a=(int *)malloc(sizeof(int)*num);
      b=(int *)malloc(sizeof(int)*num);
      for(i=0;i<num;i++)
      {
         int carda,cardb;
         scanf("%d %d",&carda,&cardb);
         a[i]=carda;
         b[i]=cardb;
      }
      pointa=0;pointb=0;
      for(i=0;i<num;i++)
      {
        if(a[i]>b[i])
        {
          pointa+=a[i]+b[i];
        }
        else if(a[i]<b[i])
        {
          pointb+=a[i]+b[i];
        }
        else
        {
           pointa+=a[i];
           pointb+=b[i];
        }
      }
      printf("%d %d\n",pointa,pointb);
      free(a);free(b);
    }
}

Compiler output:
main.c: In function 'main':
main.c:23:7: error: 'pointa' undeclared (first use in this function); did you mean 'printf'?
   23 |       pointa=0;pointb=0;
      |       ^~~~~~
      |       printf
main.c:23:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:23:16: error: 'pointb' undeclared (first use in this function); did you mean 'printf'?
   23 |       pointa=0;pointb=0;
      |                ^~~~~~
      |                printf
Language: C

#include<stdio.h>
#include<string.h>
using namespace std;
int main(void){
int n=0,a=0,b=0,a1=0,b1=0,i=0;
while(1){
scanf("%d",&n);
a1=0;
b1=0;
if(n==0){break;}
for(i=0;i<n;i++){
scanf("%d%d",&a,&b);
if(a>b){
a1=a+b;
}else if(b>a){
b1=a+b;
}else{
a1+=a;
b1+=b;
}
}
printf("%d %d\n",a1,b1);
}
return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'using'
    3 | using namespace std;
      | ^~~~~
main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    3 | using namespace std;
      |                 ^~~
Language: C

#include "stdafx.h"
#define N 10000

int main()
{
	
	int all,i;
	int a, b;
	a = 0, b = 0;
	scanf_s("%d", &all);
	int carda[N] = {0}, cardb[N] = {0};
	for (i = 0; i < all; i++) {
		scanf_s("%d", &carda[i]);
		scanf_s("%d", &cardb[i]);
	}
	
	

	for (i = 0; i < all; i++) {
		if (carda[i] > cardb[i]) {
			a += (carda[i] + cardb[i]);
		}
		else if (carda[i] == cardb[i]) {
			a += carda[i];
			b += cardb[i];
		}
		else {
			b += (carda[i] + cardb[i]);
		}
	}
	printf("%d %d\n", a, b);

    return 0;
}

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

#include <stdio.h>

int main(){
  int num;
  do{
    int px =0, py =0;
    scanf("%d", &num);
    for (int i =0; i < num; i++){
      int x, y;
      scanf("%d %d", &x, &y);
      if ( x > y ) px += x + y;
      else if(x == y) { px+=x; py+=y;}
      else py += x + y;
    }
    printf("%d %d\n", px, py);
  }while( num != 0 )
 
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:21: error: expected ';' before 'return'
   16 |   }while( num != 0 )
      |                     ^
      |                     ;
   17 | 
   18 |   return 0;
      |   ~~~~~~
Language: C

#include<stdio.h>
int main()
{
	int i1, i2, b, k, n, m[2], **c, max[2], min[2];
	scanf("%d", &n);
	m[0] = n;
	m[1] = n;
	c    = new int * [2];
	c[0] = new int [n];
	c[1] = new int [n];
	for (i1 = 0; i1 < n; i1++)
		scanf("%d", &c[0][i1]);
	qsort(c[0], n, sizeof(int), compare);
	min[0] = 0;
	max[0] = n - 1;
	k = 0;
	for (i1 = 1; i1 < c[0][0]; i1++) {
		c[1][k] = i1;
		k++;
	}
	for (i1 = 0; i1 < n-1; i1++) {
		for (i2	= c[0][i1]+1; i2 < c[0][i1+1]; i2++) {
			c[1][k] = i2;
			k++;
		}
	}
	min[1] = 0;
	max[1] = n - 1;
	k       = 1;
	b       = c[0][0];
	min[0]  = 1;
	c[0][0] = 0;
	m[0]--;
	while (m[0] > 0 && m[1] > 0) {
		if (b > c[k][max[k]])
			b = -1;
		else {
			for (i1 = min[k]; i1 <= max[k]; i1++) {
				if (c[k][i1] > b) {
					b        = c[k][i1];
					c[k][i1] = 0;
					m[k]--;
					if (i1 == min[k]) {
						for (i2 = min[k]+1; i2 <= max[k]; i2++) {
							if (c[k][i2] > 0) {
								min[k] = i2;
								break;
							}
						}
					}
					else if (i1 == max[k]) {
						for (i2 = max[k]-1; i2 >= min[k]; i2--) {
							if (c[k][i2] > 0) {
								max[k] = i2;
								break;
							}
						}
					}
					break;
				}
			}
		}
		k = (k + 1) % 2;
	}
	printf("%d\n%d\n", m[1], m[0]);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:16: error: 'new' undeclared (first use in this function)
    8 |         c    = new int * [2];
      |                ^~~
main.c:8:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:19: error: expected ';' before 'int'
    8 |         c    = new int * [2];
      |                   ^~~~
      |                   ;
main.c:9:19: error: expected ';' before 'int'
    9 |         c[0] = new int [n];
      |                   ^~~~
      |                   ;
main.c:10:19: error: expected ';' before 'int'
   10 |         c[1] = new int [n];
      |                   ^~~~
      |                   ;
main.c:13:9: error: implicit declaration of function 'qsort' [-Wimplicit-function-declaration]
   13 |         qsort(c[0], n, sizeof(int), compare);
      |         ^~~~~
main.c:13:37: error: 'compare' undeclared (first use in this function)
   13 |         qsort(c[0], n, sizeof(int), compare);
      |                                     ^~~~~~~
Language: C

#include<stdio.h>

int main(){
  int n;
  int pa, pb;
  ina sa, sb;
  for(;;){
    scanf("%d",&n);
    if(n==0) return 0;
    int i;
    for(i=0;i<n;i++){
      scanf("%d %d",&pa,&pb);
      if(pa > pb) sa += pa+pb;
      else if(pb > pa) sb += pa+pb;
      else { sa+=pa; sb += pb; }
    }
    printf("%d %d\n", sa, sb);
  }
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: unknown type name 'ina'; did you mean 'int'?
    6 |   ina sa, sb;
      |   ^~~
      |   int
Language: C

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

int main(){
  int n;
  int pa, pb;
  ina sa, sb;
  for(;;){
    scanf("%d",&n);
    if(n==0) exit(0);
    int i;
    for(i=0;i<n;i++){
      scanf("%d %d",&pa,&pb);
      if(pa > pb) sa += pa+pb;
      else if(pb > pa) sb += pa+pb;
      else { sa+=pa; sb += pb; }
    }
    printf("%d %d\n", sa, sb);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: unknown type name 'ina'; did you mean 'int'?
    7 |   ina sa, sb;
      |   ^~~
      |   int
Language: C

#include<stdio.h>

int main(){
	int n,a,b,i,ca,cb;
	a=0;
	b=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&ca,&cb);
		(ca>cb)?a+=ca+cb:b+=ca+cb;
	}
	printf("%d %d\n",a,b);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:35: error: lvalue required as left operand of assignment
   10 |                 (ca>cb)?a+=ca+cb:b+=ca+cb;
      |                                   ^~
Language: C

#include<stdio.h>

int main(){
	int n,a,b,i,ca,cb;
	a=0;
	b=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d %d",&ca,&cb);
		if(ca>cb){
		a+=ca+cb;
		}else if(ca<cb){
		b+=ca+cb;
		}else{
		a+=ca:
		b+=cb;
		}
	}
	printf("%d %d\n",a,b);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:22: error: expected ';' before ':' token
   15 |                 a+=ca:
      |                      ^
      |                      ;
Language: C

#include <stdio.h.
#define NUM 3

int main()
{
  int  a=0,b=0,i,j;
  
  int a[NUM],b[NUM];
  
  for(i=0;i<NUM;i++){
	scanf("%d",&a[i]);
	scanf("%d",&b[i]);
        if(a[i]>b[i])
	     a+=a[i]+b[i];
        else (a[i]<B[i])
	     b+=a[i]+b[i];
	else
	     a+=a[i];
	     b+=b[i];
	}
  printf("%d %d\n",a,b);
  
  return 0;
}

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

#include <stdio.h>


int main()
{
	int n;
	while (1) {
		scanf_s("%d", &n);
		if (n == 0) break;

		int a, b, A = 0, B = 0, i;
		scanf_s("%d", &a);
		scanf_s("%d", &b);

		if (a > b) { A += a + b; }
		else if (a < b) { B += a + b; }
		else if (a == b) { A += a, B += b; }
	}
	printf("%d %d", A, B);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |                 scanf_s("%d", &n);
      |                 ^~~~~~~
      |                 scanf
main.c:19:25: error: 'A' undeclared (first use in this function)
   19 |         printf("%d %d", A, B);
      |                         ^
main.c:19:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:28: error: 'B' undeclared (first use in this function)
   19 |         printf("%d %d", A, B);
      |                            ^
Language: C


int main()
{
	int n;
	while (1) {
		scanf_s("%d", &n);
		if (n == 0) break;

		int a, b, A = 0, B = 0, i;
		scanf_s("%d", &a);
		scanf_s("%d", &b);

		for (i = 0;i < n;i++) {
			if (a > b) { A += a + b; }
			else if (a < b) { B += a + b; }
			else if (a == b) { A += a, B += b; }
		}
	}
	printf("%d %d", A, B);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:17: error: implicit declaration of function 'scanf_s' [-Wimplicit-function-declaration]
    6 |                 scanf_s("%d", &n);
      |                 ^~~~~~~
main.c:19:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   19 |         printf("%d %d", A, B);
      |         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | 
main.c:19:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   19 |         printf("%d %d", A, B);
      |         ^~~~~~
main.c:19:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:19:25: error: 'A' undeclared (first use in this function)
   19 |         printf("%d %d", A, B);
      |                         ^
main.c:19:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:19:28: error: 'B' undeclared (first use in this function)
   19 |         printf("%d %d", A, B);
      |                            ^
Language: C

#include <stdio.h>
int main(){
????????int n;
????????while(1){
????????scanf("%d",&n);
????????if(n==0)break;
????????int A=0,B=0,a=0,b=0,i=0;
????????for(i=0;i<n;i++){
????????????????scanf("%d %d",&a,&b);
????????????????if(a>b){A+=a+b;
????????????????}else if(a<b){B+=a+b;
????????????????}else if(a=b){A+=a;B+=b;}
????????}
????????printf("%d %d\n",A,B);
????????}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:1: error: expected expression before '?' token
    3 | ????????int n;
      | ^
main.c:4:1: error: expected expression before '?' token
    4 | ????????while(1){
      | ^
Language: C


int main()
{
	int n;
	int a, b, A = 0, B = 0, i;
	while (1) {
		scanf_s("%d", &n);
		if (n == 0) break;

		scanf_s("%d %d", &a, &b);

		for (i = 0;i < n;i++) {
			if (a > b) { A += a + b; }
			else if (a < b) { B += a + b; }
			else if (a == b) { A += a; B += b; }
		}
	}
	printf("%d %d", A, B);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:17: error: implicit declaration of function 'scanf_s' [-Wimplicit-function-declaration]
    7 |                 scanf_s("%d", &n);
      |                 ^~~~~~~
main.c:18:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   18 |         printf("%d %d", A, B);
      |         ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | 
main.c:18:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   18 |         printf("%d %d", A, B);
      |         ^~~~~~
main.c:18:9: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>
??
int main(){
????????int n, i, a, b, sumA, sumB;
????????while(1){
????????????????scanf("%d", &n);
????????????????if(n==0) break;
????????????????sumA=sumB=0;
????????????????for(i=0;i<n;++i){
????????????????????????scanf("%d %d", &a, &b);
????????????????????????if(a>b) sumA=sumA+a+b;
????????????????????????else if(a<b) sumB=sumB+a+b;
????????????????????????else{
????????????????????????????????sumA=sumA+a;
????????????????????????????????sumB=sumB+b;
????????????????????????}
????????????????}???? 
????????????????printf("%d %d\n", sumA, sumB);
????????}
????????return 0;
}

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

#include <stdio.h>

int main()
{

	int n, cardA, cardB, aSc, bSc, i;

	while(scanf("%d", &n), n != 0) {

		aSc = bSc = 0;

		for(i = 0; i < n; i++) {
			scanf("%d %d", &cardA, &cardB);
			cardA > cardB ? aSc += cardA + cardB : bSc += cardA + cardB;
		}

		printf("%d %d\n", aSc, bSc);

	}

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:14:68: error: lvalue required as left operand of assignment
   14 |                         cardA > cardB ? aSc += cardA + cardB : bSc += cardA + cardB;
      |                                                                    ^~
Language: C

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int n,a,b,countA=0,countB=0;
    cin>>n;
    if(n!=0){
    do{
        for(int i=0;i<n;i++){
            cin>>a>>b;
            if(a>b){
                countA+=(a+b);
            }else if(a<b){
                countB+=(a+b);
            }//a==b
        }
        cout<<countA<<" "<<countB;
        cout<<"\n";
        countA=0,countB=0;
        cin>>n;
        if(n==0)break;
    }while(1);
    }
    cout<<endl;
}

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>

int main(){
   int n=0;
   int i=0;
   int a[10000], b[10000];
   int a=0, b=0;
   int ansA=0, ansB=0;

   scanf("%d", &n);

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

      for(i=0;i<n;i++){
         a=a[i];
         b=b[i];
         if(a<b){
            ansB=ansB+a+b;
         }else if(b<a){
            ansA=ansA+a+b;
         }else{
            ansA=ansA+a;
            ansB=ansB+b;
         }
      }
      scanf("%d", &n);
   }

   printf("%d %d\n", ansA, ansB);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:8: error: conflicting types for 'a'; have 'int'
    7 |    int a=0, b=0;
      |        ^
main.c:6:8: note: previous declaration of 'a' with type 'int[10000]'
    6 |    int a[10000], b[10000];
      |        ^
main.c:7:13: error: conflicting types for 'b'; have 'int'
    7 |    int a=0, b=0;
      |             ^
main.c:6:18: note: previous declaration of 'b' with type 'int[10000]'
    6 |    int a[10000], b[10000];
      |                  ^
Language: C

#include<stdio.h>

int main(void){
    int A[10000],B[10000],n,i,Anum=0,Bnum=0;
    scanf("&d",n);
    
    if(i=n;i=0;i--){
        scanf("%d %d",A[i],B[i]);
        if(A[i]>B[i])
            Anum=Anum+a[i]+B[i];
        else if(A[i]<B[i])
            Anum=Bnum+a[i]+B[i];
        else{ 
            Anum+=A[i];
            Bnum+=B[i];
        }

    }
    printf("%d %d",Anum,Bnum);
}
 

Compiler output:
main.c: In function 'main':
main.c:7:11: error: expected ')' before ';' token
    7 |     if(i=n;i=0;i--){
      |       ~   ^
      |           )
main.c:10:23: error: 'a' undeclared (first use in this function)
   10 |             Anum=Anum+a[i]+B[i];
      |                       ^
main.c:10:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){
    int A[10000],B[10000],n,i,Anum=0,Bnum=0;
    scanf("&d",&n);
    
    if(i=n;i=0;i--){
        scanf("%d %d",&A[i],&B[i]);
        if(A[i]>B[i])
            Anum=Anum+a[i]+B[i];
        else if(A[i]<B[i])
            Anum=Bnum+a[i]+B[i];
        else{ 
            Anum+=A[i];
            Bnum+=B[i];
        }

    }
    printf("%d %d",Anum,Bnum);
}
 

Compiler output:
main.c: In function 'main':
main.c:7:11: error: expected ')' before ';' token
    7 |     if(i=n;i=0;i--){
      |       ~   ^
      |           )
main.c:10:23: error: 'a' undeclared (first use in this function)
   10 |             Anum=Anum+a[i]+B[i];
      |                       ^
main.c:10:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
    int A[10000],B[10000],n,i,Anum=0,Bnum=0;
    scanf("%d",&n);
    
    if(i=n;i=0;i--){
        scanf("%d %d",&A[i],&B[i]);
        if(A[i]>B[i])
            Anum=Anum+a[i]+B[i];
        else if(A[i]<B[i])
            Anum=Bnum+a[i]+B[i];
        else{ 
            Anum+=A[i];
            Bnum+=B[i];
        }

    }
    printf("%d %d",Anum,Bnum);
}
 

Compiler output:
main.c: In function 'main':
main.c:7:11: error: expected ')' before ';' token
    7 |     if(i=n;i=0;i--){
      |       ~   ^
      |           )
main.c:10:23: error: 'a' undeclared (first use in this function)
   10 |             Anum=Anum+a[i]+B[i];
      |                       ^
main.c:10:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
    int A[10000],B[10000],n,i,Anum=0,Bnum=0;
    scanf("%d",&n);
    
    if(i=n;i>0;i--){
        scanf("%d %d",&A[i],&B[i]);
        if(A[i]>B[i])
            Anum=Anum+a[i]+B[i];
        else if(A[i]<B[i])
            Anum=Bnum+a[i]+B[i];
        else{ 
            Anum+=A[i];
            Bnum+=B[i];
        }

    }
    printf("%d %d",Anum,Bnum);
}
 

Compiler output:
main.c: In function 'main':
main.c:7:11: error: expected ')' before ';' token
    7 |     if(i=n;i>0;i--){
      |       ~   ^
      |           )
main.c:10:23: error: 'a' undeclared (first use in this function)
   10 |             Anum=Anum+a[i]+B[i];
      |                       ^
main.c:10:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main(void){
    int A[10000],B[10000],n,i,Anum=0,Bnum=0;
    scanf("%d",&n);
    
    if(i=n;i>0;i--){
        scanf("%d %d",&A[i],&B[i]);
        if(A[i]>B[i])
            Anum=Anum+A[i]+B[i];
        else if(A[i]<B[i])
            Anum=Bnum+A[i]+B[i];
        else{ 
            Anum+=A[i];
            Bnum+=B[i];
        }

    }
    printf("%d %d",Anum,Bnum);
}
 

Compiler output:
main.c: In function 'main':
main.c:7:11: error: expected ')' before ';' token
    7 |     if(i=n;i>0;i--){
      |       ~   ^
      |           )
Language: C

#include <stdio.h>
 
int main(void){
    int A[10000],B[10000],n,i,Anum=0,Bnum=0;
    scanf("%d",&n);
     
    if(i=n;i=0;i--){
        scanf("%d %d",&A[i],&B[i]);
        if(A[i]>B[i])
            Anum=Anum+a[i]+B[i];
        else if(A[i]<B[i])
            Bnum=Bnum+a[i]+B[i];
        else{ 
            Anum+=A[i];
            Bnum+=B[i];
        }
 
    }
    printf("%d %d",Anum,Bnum);
}

Compiler output:
main.c: In function 'main':
main.c:7:11: error: expected ')' before ';' token
    7 |     if(i=n;i=0;i--){
      |       ~   ^
      |           )
main.c:10:23: error: 'a' undeclared (first use in this function)
   10 |             Anum=Anum+a[i]+B[i];
      |                       ^
main.c:10:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
int main(void){
    int A[10000],B[10000],n,i,Anum=0,Bnum=0;
    scanf("%d",&n);
     
    for(i=n;i=0;i--){
        scanf("%d %d",&A[i],&B[i]);
        if(A[i]>B[i])
            Anum=Anum+a[i]+B[i];
        else if(A[i]<B[i])
            Bnum=Bnum+a[i]+B[i];
        else{ 
            Anum+=A[i];
            Bnum+=B[i];
        }
 
    }
    printf("%d %d",Anum,Bnum);
}

Compiler output:
main.c: In function 'main':
main.c:10:23: error: 'a' undeclared (first use in this function)
   10 |             Anum=Anum+a[i]+B[i];
      |                       ^
main.c:10:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
 
int main(void){
    int A[10000],B[10000],n,i,Anum=0,Bnum=0;
    scanf("%d",&n);
     
    for(i=n;i>0;i--){
        scanf("%d %d",&A[i],&B[i]);
        if(A[i]>B[i])
            Anum=Anum+a[i]+B[i];
        else if(A[i]<B[i])
            Bnum=Bnum+a[i]+B[i];
        else{ 
            Anum+=A[i];
            Bnum+=B[i];
        }
 
    }
    printf("%d %d",Anum,Bnum);
}

Compiler output:
main.c: In function 'main':
main.c:10:23: error: 'a' undeclared (first use in this function)
   10 |             Anum=Anum+a[i]+B[i];
      |                       ^
main.c:10:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

void main() {
	int n, a, b;
	int suma = 0;
	int sumb = 0;
	bool endflg = false;
	while (1) {
		scanf_s("%d", &n);
		if (n == 0) {
			return;
		}
		int i;
		for (i = n; i > 0; i--) {
			scanf_s("%d %d", &a, &b);
			if (a > b) {
				suma = suma + a + b;
			}
			else if (b > a) {
				sumb = sumb + a + b;
			}
			else {
				suma = suma + a;
				sumb = sumb + b;
			}
		}
		printf("%d %d\n", suma, sumb);
		suma = 0;
		sumb = 0;
	}
	
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool endflg = false;
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:7:23: error: 'false' undeclared (first use in this function)
    7 |         bool endflg = false;
      |                       ^~~~~
main.c:7:23: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:7:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    9 |                 scanf_s("%d", &n);
      |                 ^~~~~~~
      |                 scanf
Language: C

#include <stdio.h>

int main(void) {
	int n, a, b;
	int suma = 0;
	int sumb = 0;
	while (1) {
		scanf_s("%d", &n);
		if (n == 0) {
			return;
		}
		int i;
		for (i = n; i > 0; i--) {
			scanf_s("%d %d", &a, &b);
			if (a > b) {
				suma = suma + a + b;
			}
			else if (b > a) {
				sumb = sumb + a + b;
			}
			else {
				suma = suma + a;
				sumb = sumb + b;
			}
		}
		printf("%d %d\n", suma, sumb);
		suma = 0;
		sumb = 0;
	}
	
}

Compiler output:
main.c: In function 'main':
main.c:8:17: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |                 scanf_s("%d", &n);
      |                 ^~~~~~~
      |                 scanf
main.c:10:25: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   10 |                         return;
      |                         ^~~~~~
main.c:3:5: note: declared here
    3 | int main(void) {
      |     ^~~~
Language: C

#include <stdio.h>
int main (){
while (1){
int i,ny[101]={0},ny2[101]={0},sum=0,sum2=0;
scanf ("%d",&i);
if (i==0) break;
for (int s=0;s<i;s++){
        scanf ("%d %d",&ny[s],&ny2[s]);
}
for (int s=0;s<i;s++){
        if (ny[s]>ny2[s]){
                sum=sum+ny[s]+ny2[s];
                }
        else if (ny[s]<ny2[s]){
                sum2=sum2+ny[s]+ny2[s];
                }
        else if (ny[s]==ny2[s]){
                sum=sum+ny[s];
                sum2=sum2+ny2[s];
                }
}
printf ("%d %d\n",sum,sum2);
}
return 0;
}

~                                                                               
~                    

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

#include<stdio.h>
int main(void)
{
	int A=0, B=0, n, i, Aa[10001] = { 0 }, Bb[10001] = { 0 },c;
	while (1)
	{

		for (c = 1; c <= 2; c++)
		{
			A = 0;
			B = 0;
			n = 0;
			i = 0;
			Aa[10001] = { 0 };
			Bb[10001] = { 0 };
		}

		scanf("%d", &n);

		if (n == 0)
		{
			break;
		}

		for (i = 1; i <= n; i++)
		{
			scanf("%d %d", &Aa[i], &Bb[i]);

			if (Aa[i] > Bb[i])
			{
				A = A + Aa[i] + Bb[i];
			}

			else if (Aa[i] < Bb[i])
			{
				B = B + Aa[i] + Bb[i];
			}

			else
			{
				A = A + Aa[i];
				B = B + Bb[i];
			}

		}

		printf("%d %d\n", A, B);

	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:37: error: expected expression before '{' token
   14 |                         Aa[10001] = { 0 };
      |                                     ^
main.c:15:37: error: expected expression before '{' token
   15 |                         Bb[10001] = { 0 };
      |                                     ^
Language: C

#include <stdio.h>
int main(){
int n,a=0,b=0,i,ai,bi;
scanf("%d",&n);
if(n==0)break;
for(i=0;i<n;i++){
scanf("%d %d",&ai,&bi);
if(ai>bi)a=a+ai+bi;
else if(ai<bi)b=b+ai+bi;
else {a+=ai;
      b+=bi;}
              }
printf("%d %d\n",a,b);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: break statement not within loop or switch
    5 | if(n==0)break;
      |         ^~~~~
Language: C

#include <stdio.h>
int main(){
int n,a=0,b=0,i,ai,bi;
scanf("%d",&n);
if(n==0)break;
for(i=0;i<n;i++){
scanf("%d %d\n",&ai,&bi);
if(ai>bi)a=a+ai+bi;
else if(ai<bi)b=b+ai+bi;
else {a+=ai;
      b+=bi;}
              }
printf("%d %d\n",a,b);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: break statement not within loop or switch
    5 | if(n==0)break;
      |         ^~~~~
Language: C

#include<stdio.h>
int main()
{
  int n,i;
  int a,b;
  int point[2];

  while(scanf("%d",&n) != 0)
  {
    for(i=0; i<n; ++i)
    {
      scanf("%d%d",&a,&b);
      point[0] = point[1] = 0;
      if(a > b) point[0] += ツ　a + b;
      if(a < b) point[1] += ツ　a + b;
      if(a == b)
      {
        point[0] += a;
        point[1] += b;
      }
    }
    printf("%d %d\n",point[0],point[1]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:31: error: stray '\343' in program
   14 |       if(a > b) point[0] += <U+30C4><U+3000>a + b;
      |                                     ^~~~~~~~
main.c:14:29: error: '\U000030c4' undeclared (first use in this function)
   14 |       if(a > b) point[0] += ツ　a + b;
      |                             ^~
main.c:14:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:31: error: expected ';' before 'a'
   14 |       if(a > b) point[0] += ツ　a + b;
      |                               ^ ~
      |                               ;
main.c:15:31: error: stray '\343' in program
   15 |       if(a < b) point[1] += <U+30C4><U+3000>a + b;
      |                                     ^~~~~~~~
main.c:15:31: error: expected ';' before 'a'
   15 |       if(a < b) point[1] += ツ　a + b;
      |                               ^ ~
      |                               ;
Language: C

#include <stdio.h>

int main(void){
	int i, n;
	int score_a, score_b;
	int card_a, card_b;
	while(1){
		score_a = 0;
		score_b = 0;
		scanf("%d", &n);
		if(n == 0){
			return 0;
		}else{
			for(i=0;i<n;i++){
				scanf("%d, %d", &card_a, &card_b);
				if(card_a < card_b){
					score_b = score_b + card_a + card_b;
				}else if(card_b < card_a){
					score_a = score_a + card_a + card_b;
				}else{
					score_a += card_a;
					socre_b += card_b;
				}
			}
			printf("%d %d\n", score_a, score_b);
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:41: error: 'socre_b' undeclared (first use in this function); did you mean 'score_b'?
   22 |                                         socre_b += card_b;
      |                                         ^~~~~~~
      |                                         score_b
main.c:22:41: note: each undeclared identifier is reported only once for each function it appears in
Language: C

main(n,a,b,x,y,i){for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(n,a,b,x,y,i){for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}
      | ^~~~
main.c: In function 'main':
main.c:1:1: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'x' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'y' defaults to 'int' [-Wimplicit-int]
main.c:1:1: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:1:30: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(n,a,b,x,y,i){for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}
      |                              ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(n,a,b,x,y,i){for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}
main.c:1:30: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(n,a,b,x,y,i){for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}
      |                              ^~~~~
main.c:1:30: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:47: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(n,a,b,x,y,i){for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}
      |                                               ^~~~~~
main.c:1:47: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:47: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:47: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:128: error: lvalue required as left operand of assignment
    1 | main(n,a,b,x,y,i){for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}
      |                                                                                                                                ^~
Language: C

main(){int n,a,b,x,y,i;for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){int n,a,b,x,y,i;for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}
      | ^~~~
main.c: In function 'main':
main.c:1:35: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(){int n,a,b,x,y,i;for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}
      |                                   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){int n,a,b,x,y,i;for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}
main.c:1:35: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(){int n,a,b,x,y,i;for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}
      |                                   ^~~~~
main.c:1:35: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:52: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(){int n,a,b,x,y,i;for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}
      |                                                    ^~~~~~
main.c:1:52: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:52: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:52: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:133: error: lvalue required as left operand of assignment
    1 | main(){int n,a,b,x,y,i;for(;x=y=0,scanf("%d",&n),n;printf("%d %d\n",x,y))for(i=n;scanf("%d%d",&a,&b),i;--i)(a-b)?x+=a,y+=b:(a>b?x:y)+=a+b;}
      |                                                                                                                                     ^~
Language: C

#include <stdio.h>
int main(void){
  int i,a,b,c,d;
  for(i=0; i<9; i++;){
    scanf("%d%d\n",a,b);
    
    if(a>b){c=a+b;}
    if(a<b){d=a+b;}
    if(a=b){c=a,d=b;}
}
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:20: error: expected ')' before ';' token
    4 |   for(i=0; i<9; i++;){
      |      ~             ^
      |                    )
Language: C

#include <stdio.h>
int main(void){
  int i,a,b,c,d;
  while(n<=10000){
    scanf("%d%d\n",&a,&b);
    
    if(a>b){c=a+b;}
    if(a<b){d=a+b;}
    if(a=b){c=a,d=b;}
}
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:9: error: 'n' undeclared (first use in this function)
    4 |   while(n<=10000){
      |         ^
main.c:4:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

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

  int i,a,b,c,d,e,f,i,n;
  a=0;
  b=0;
  c=0;
  d=0;
  e=0;
  f=0;
  i=0;
  n<=10000
  
    for(i=0,i<3,i++){

    scanf("%d\n",&n);
    
    while(n){
      scanf("%d%d\n",&a,&b);
    
      if(a>b){c=a+b;}
      if(a<b){d=a+b;}
      if(a=b){c=a,d=b;}
      for(i=0,i<1,i++){
	e=c;
      }
      if(i<=1){
	e=e+c;
      }
    }

    return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:4:21: error: redeclaration of 'i' with no linkage
    4 |   int i,a,b,c,d,e,f,i,n;
      |                     ^
main.c:4:7: note: previous declaration of 'i' with type 'int'
    4 |   int i,a,b,c,d,e,f,i,n;
      |       ^
main.c:12:11: error: expected ';' before 'for'
   12 |   n<=10000
      |           ^
      |           ;
   13 | 
   14 |     for(i=0,i<3,i++){
      |     ~~~    
main.c:33:5: error: expected declaration or statement at end of input
   33 |     }
      |     ^
Language: C

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

  int i,a,b,c,d,e,f,i,n;
  a=0;
  b=0;
  c=0;
  d=0;
  e=0;
  f=0;
  i=0;
  n<=10000;
  
    for(i=0,i<3,i++){

    scanf("%d\n",&n);
    
    while(n){
      scanf("%d%d\n",&a,&b);
    
      if(a>b){c=a+b;}
      if(a<b){d=a+b;}
      if(a=b){c=a,d=b;}
      for(i=0,i<1,i++){
	e=c;
      }
      if(i<=1){
	e=e+c;
      }
    }

    return 0;
    }

Compiler output:
main.c: In function 'main':
main.c:4:21: error: redeclaration of 'i' with no linkage
    4 |   int i,a,b,c,d,e,f,i,n;
      |                     ^
main.c:4:7: note: previous declaration of 'i' with type 'int'
    4 |   int i,a,b,c,d,e,f,i,n;
      |       ^
main.c:14:20: error: expected ';' before ')' token
   14 |     for(i=0,i<3,i++){
      |                    ^
      |                    ;
main.c:14:20: error: expected expression before ')' token
main.c:24:22: error: expected ';' before ')' token
   24 |       for(i=0,i<1,i++){
      |                      ^
      |                      ;
main.c:24:22: error: expected expression before ')' token
main.c:33:5: error: expected declaration or statement at end of input
   33 |     }
      |     ^
Language: C

#include <stdio.h>
int main(void){
  
  int   a,b,c,d,e,f,i,n;
  a=0;
  b=0;
  c=0;
  d=0;
  e=0;
  f=0;
  i=0;
  n<=10000;
  
  for(i=0,i<3,i++;)
    
    scanf("%d\n",&n);
  
  while(n){
    scanf("%d%d\n",&a,&b);
    
    if(a>b){c=a+b;}
    if(a<b){d=a+b;}
    if(a=b){c=a,d=b;}
    for(i=0,i<1,i++:)
      e=c;
  }
  if(i<=1){
    e=e+c;
  }
}

 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:19: error: expected expression before ')' token
   14 |   for(i=0,i<3,i++;)
      |                   ^
main.c:24:20: error: expected ';' before ':' token
   24 |     for(i=0,i<1,i++:)
      |                    ^
      |                    ;
main.c:24:21: error: expected expression before ')' token
   24 |     for(i=0,i<1,i++:)
      |                     ^
main.c: At top level:
main.c:32:2: error: expected identifier or '(' before 'return'
   32 |  return 0;
      |  ^~~~~~
main.c:33:1: error: expected identifier or '(' before '}' token
   33 | }
      | ^
Language: C

a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);(c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);(c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);(c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);(c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |     ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);(c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |       ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'd' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);(c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |                   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);(c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);(c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |                   ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:63: error: lvalue required as left operand of assignment
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);(c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |                                                               ^~
main.c:1:67: error: expected ')' before 'c'
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);(c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |                  ~                                                ^
      |                                                                   )
main.c:1:106: error: expected expression before '}' token
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);(c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |                                                                                                          ^
Language: C

a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |     ^
main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int]
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |       ^~~~
main.c: In function 'main':
main.c:1:7: error: type of 'd' defaults to 'int' [-Wimplicit-int]
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |                   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |                   ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:62: error: lvalue required as left operand of assignment
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |                                                              ^~
main.c:1:76: error: lvalue required as left operand of assignment
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |                                                                            ^~
main.c:1:83: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | a,b,c;main(d){for(scanf("%d");~scanf("%d%d",&c,&d);c>d?a+=c:b+=d)c<d?b+=c:a+=d;a=!printf("%d %d\n",a,b);}
      |                                                                                   ^~~~~~
main.c:1:83: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:83: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:83: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#includestdio.h

int main(void){
int n,a,b,i;

while(scanf("%d",&n),n){
int Pa=0,Pb=0;
for(i=0;in;i++){
scanf("%d %d",&a,&b);
if(a>b)Pa+=a+b;
else if(a
else {Pa+=a; Pb+=b;}
}
printf("%d %d\n",Pa,Pb);
}
return 0;
}

Compiler output:
main.c:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #includestdio.h
      |         ^
main.c: In function 'main':
main.c:6:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 | while(scanf("%d",&n),n){
      |       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #includestdio.h
main.c:6:7: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 | while(scanf("%d",&n),n){
      |       ^~~~~
main.c:6:7: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:8:10: error: stray '\302' in program
    8 | for(i=0;i<U+0081><U+0083>n;i++){
      |          ^~~~~~~~
main.c:8:11: error: stray '\302' in program
    8 | for(i=0;i<U+0081><U+0083>n;i++){
      |                  ^~~~~~~~
main.c:8:10: error: expected ';' before 'n'
    8 | for(i=0;in;i++){
      |          ^ ~
      |          ;
main.c:11:10: error: expected ')' before 'else'
   11 | else if(a
      |        ~ ^
      |          )
   12 | else {Pa+=a; Pb+=b;}
      | ~~~~      
main.c:13:1: error: expected expression before '}' token
   13 | }
      | ^
main.c:14:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   14 | printf("%d %d\n",Pa,Pb);
      | ^~~~~~
main.c:14:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:14:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:14:1: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>

void main(){
    int n, i;
    int card[2];
    int result[2];
    result[0] = result[1] = 0;
    scanf("%d",&n);
    for(i=0;i < n;i++){
        card[0] = card[1] = 0;
        scanf("%d %d", &card[0], &card[1]);
        if(card[0] < card[1]) result[1] += card[0] + card[1];
        else if(card[0] > card[1]) result[0] += card[0] + card[1];
        else{
            result[0] += card[0];
            result[1] += card[1];
        }
    }
    printf("%d %d\n", result[0], result[1]);
　　return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:1: error: stray '\343' in program
   20 | <U+3000><U+3000>return 0;
      | ^~~~~~~~
main.c:20:3: error: stray '\343' in program
   20 | <U+3000><U+3000>return 0;
      |         ^~~~~~~~
main.c:20:12: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
   20 | 　　return 0;
      |            ^
main.c:3:6: note: declared here
    3 | void main(){
      |      ^~~~
Language: C

c,d,s="%d %d\n";
main(n,a,b){
for(;scanf("%d ",&n),n;
printf(s,c,d))
for(c=d=0;n--;){
scanf(s,&a,&b);
(a>=b?c:d)+=a;
(b>=a?d:c)+=b;
}
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | c,d,s="%d %d\n";
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
    1 | c,d,s="%d %d\n";
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
    1 | c,d,s="%d %d\n";
      |     ^
main.c:1:7: error: initialization of 'int' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
    1 | c,d,s="%d %d\n";
      |       ^~~~~~~~~
main.c:1:7: error: initializer element is not computable at load time
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(n,a,b){
      | ^~~~
main.c: In function 'main':
main.c:2:1: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:2:1: error: type of 'a' defaults to 'int' [-Wimplicit-int]
main.c:2:1: error: type of 'b' defaults to 'int' [-Wimplicit-int]
main.c:3:6: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 | for(;scanf("%d ",&n),n;
      |      ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | c,d,s="%d %d\n";
main.c:3:6: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 | for(;scanf("%d ",&n),n;
      |      ^~~~~
main.c:3:6: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:1: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    4 | printf(s,c,d))
      | ^~~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:1: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:4:8: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    4 | printf(s,c,d))
      |        ^
      |        |
      |        int
main.c:4:8: note: expected 'const char *' but argument is of type 'int'
main.c:6:7: error: passing argument 1 of 'scanf' makes pointer from integer without a cast [-Wint-conversion]
    6 | scanf(s,&a,&b);
      |       ^
      |       |
      |       int
main.c:6:7: note: expected 'const char *' but argument is of type 'int'
main.c:7:11: error: lvalue required as left operand of assignment
    7 | (a>=b?c:d)+=a;
      |           ^~
main.c:8:11: error: lvalue required as left operand of assignment
    8 | (b>=a?d:c)+=b;
      |           ^~