Language: C

w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'w' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
      |     ^
main.c:1:7: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
      |       ^
main.c:1:9: error: type defaults to 'int' in declaration of 'q' [-Wimplicit-int]
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
      |         ^
main.c:1:11: error: type defaults to 'int' in declaration of 'r' [-Wimplicit-int]
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
      |           ^
main.c:1:17: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
      |                 ^
main.c:1:23: error: return type defaults to 'int' [-Wimplicit-int]
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
      |                       ^~~~
main.c: In function 'main':
main.c:1:39: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
      |                                       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
main.c:1:39: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
      |                                       ^~~~~
main.c:1:39: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:163: error: 'ret' undeclared (first use in this function)
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
      |                                                                                                                                                                   ^~~
main.c:1:163: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:193: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | w,d,c,i,q,r[21],s[21];main(){while(1){scanf("%d%d",&w,&d);if(!w&&!d){return 0;}for(;w--;){scanf("%d",&c);r[c]++;}for(;d--;){scanf("%d",&c);s[c]++;}for(;i<21;i++){ret+=(r[i]>s[i]?r[i]:s[i])*i;}printf("%d\n",q);}}
      |                                                                                                                                                                                                 ^~~~~~
main.c:1:193: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:193: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:193: note: include '<stdio.h>' or provide a declaration of 'printf'