Language: C

main(a,b,n){while(1){scanf("%d",&n);if(!n)break;for(x=y=0;n--;){scanf("%d%d",&a,&b);a>b?x+=a+b:a<b?y+=a+b:0;;a==b?x+=a,y+=b:0;}printf("%d %d\n",x,y);}exit(0);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(a,b,n){while(1){scanf("%d",&n);if(!n)break;for(x=y=0;n--;){scanf("%d%d",&a,&b);a>b?x+=a+b:a<b?y+=a+b:0;;a==b?x+=a,y+=b:0;}printf("%d %d\n",x,y);}exit(0);}
      | ^~~~
main.c: In function 'main':
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 'n' defaults to 'int' [-Wimplicit-int]
main.c:1:22: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(a,b,n){while(1){scanf("%d",&n);if(!n)break;for(x=y=0;n--;){scanf("%d%d",&a,&b);a>b?x+=a+b:a<b?y+=a+b:0;;a==b?x+=a,y+=b:0;}printf("%d %d\n",x,y);}exit(0);}
      |                      ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(a,b,n){while(1){scanf("%d",&n);if(!n)break;for(x=y=0;n--;){scanf("%d%d",&a,&b);a>b?x+=a+b:a<b?y+=a+b:0;;a==b?x+=a,y+=b:0;}printf("%d %d\n",x,y);}exit(0);}
main.c:1:22: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(a,b,n){while(1){scanf("%d",&n);if(!n)break;for(x=y=0;n--;){scanf("%d%d",&a,&b);a>b?x+=a+b:a<b?y+=a+b:0;;a==b?x+=a,y+=b:0;}printf("%d %d\n",x,y);}exit(0);}
      |                      ^~~~~
main.c:1:22: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:53: error: 'x' undeclared (first use in this function)
    1 | main(a,b,n){while(1){scanf("%d",&n);if(!n)break;for(x=y=0;n--;){scanf("%d%d",&a,&b);a>b?x+=a+b:a<b?y+=a+b:0;;a==b?x+=a,y+=b:0;}printf("%d %d\n",x,y);}exit(0);}
      |                                                     ^
main.c:1:53: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:55: error: 'y' undeclared (first use in this function)
    1 | main(a,b,n){while(1){scanf("%d",&n);if(!n)break;for(x=y=0;n--;){scanf("%d%d",&a,&b);a>b?x+=a+b:a<b?y+=a+b:0;;a==b?x+=a,y+=b:0;}printf("%d %d\n",x,y);}exit(0);}
      |                                                       ^
main.c:1:128: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(a,b,n){while(1){scanf("%d",&n);if(!n)break;for(x=y=0;n--;){scanf("%d%d",&a,&b);a>b?x+=a+b:a<b?y+=a+b:0;;a==b?x+=a,y+=b:0;}printf("%d %d\n",x,y);}exit(0);}
      |                                                                                                                                ^~~~~~
main.c:1:128: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:128: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:128: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:151: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    1 | main(a,b,n){while(1){scanf("%d",&n);if(!n)break;for(x=y=0;n--;){scanf("%d%d",&a,&b);a>b?x+=a+b:a<b?y+=a+b:0;;a==b?x+=a,y+=b:0;}printf("%d %d\n",x,y);}exit(0);}
      |                                                                                                                                                       ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | main(a,b,n){while(1){scanf("%d",&n);if(!n)break;for(x=y=0;n--;){scanf("%d%d",&a,&b);a>b?x+=a+b:a<b?y+=a+b:0;;a==b?x+=a,y+=b:0;}printf("%d %d\n",x,y);}exit(0);}
main.c:1:151: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    1 | main(a,b,n){while(1){scanf("%d",&n);if(!n)break;for(x=y=0;n--;){scanf("%d%d",&a,&b);a>b?x+=a+b:a<b?y+=a+b:0;;a==b?x+=a,y+=b:0;}printf("%d %d\n",x,y);}exit(0);}
      |                                                                                                                                                       ^~~~
main.c:1:151: note: include '<stdlib.h>' or provide a declaration of 'exit'