Language: C

#define s(a,b) (t=a,a=b,b=t)
char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}

Compiler output:
main.c:2:13: warning: data definition has no type or storage class
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |             ^
main.c:2:13: error: type defaults to 'int' in declaration of 'q' [-Wimplicit-int]
main.c:2:15: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |               ^
main.c:2:17: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |                 ^
main.c:2:19: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |                   ^
main.c:2:21: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |                     ^
main.c:2:23: error: type defaults to 'int' in declaration of 'e' [-Wimplicit-int]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |                       ^
main.c:2:25: error: type defaults to 'int' in declaration of 'f' [-Wimplicit-int]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |                         ^
main.c:2:27: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |                           ^
main.c:2:29: error: type defaults to 'int' in declaration of 'r' [-Wimplicit-int]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |                             ^
main.c:2:31: error: return type defaults to 'int' [-Wimplicit-int]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |                               ^~~~
main.c: In function 'main':
main.c:2:31: error: type of 'n' defaults to 'int' [-Wimplicit-int]
main.c:2:47: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |                                               ^~~~
main.c:2:52: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |                                                    ^~~~
main.c:2:262: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |                                                                                                                                                                                                                                                                      ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
  +++ |+#include <stdio.h>
    1 | #define s(a,b) (t=a,a=b,b=t)
main.c:2:262: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    2 | char p[9],m;q,a,b,c,d,e,f,t,r;main(n){while(n=atoi(gets(p))){r=a=1,b=6,c=2,d=5,e=3,f=4;while(n--){gets(p);m=*p-70;if(m%6==0){s(c,e);s(d,f);q=m^6?s(e,f):s(c,d);}else if(7<m&&m<14){s(a,c);s(b,d);q=m^13?s(c,d):s(a,b);}else{s(a,e);s(b,f);q=m>0?s(e,f):s(a,b);}r+=a;}printf("%d\n",r);}}
      |                                                                                                                                                                                                                                                                      ^~~~~~
main.c:2:262: note: include '<stdio.h>' or provide a declaration of 'printf'