Language: C

a,b,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}printf("%d\n",s);}}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a,b,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}printf("%d\n",s);}}
      | ^
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,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}printf("%d\n",s);}}
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
    1 | a,b,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}printf("%d\n",s);}}
      |     ^
main.c:1:7: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
    1 | a,b,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}printf("%d\n",s);}}
      |       ^
main.c:1:9: error: return type defaults to 'int' [-Wimplicit-int]
    1 | a,b,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}printf("%d\n",s);}}
      |         ^~~~
main.c: In function 'main':
main.c:1:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | a,b,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}printf("%d\n",s);}}
      |                     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | a,b,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}printf("%d\n",s);}}
main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | a,b,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}printf("%d\n",s);}}
      |                     ^~~~~
main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:83: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    1 | a,b,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}printf("%d\n",s);}}
      |                                                                                   ^~~~
main.c:1:244: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | a,b,d,n;main(){for(;scanf("%d\n",&n),n;){char r[9];int c[3]={1,2,3},s=1;for(;n>0&&gets(r);n--){a=1,b=0;if(r[0]=='E')a=0,b=2;if(r[0]=='W')a=2,b=0;if(r[0]=='S')a=0,b=1;if(r[0]=='R')a=2,b=1;if(r[0]=='L')a=1,b=2;d=c[a];c[a]=7-c[b];c[b]=d;s+=c[0];}printf("%d\n",s);}}
      |                                                                                                                                                                                                                                                    ^~~~~~
main.c:1:244: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:244: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:244: note: include '<stdio.h>' or provide a declaration of 'printf'