Language: C

#define d for(x=0;x<N;x++){for(y=0;y<N;y++
c,m[10][10],x,N;main(y){for(;scanf("%d",&N),N;){d)m[x][y]=(x+y)*(x-~y)/2+1+(x+y\&1?x:y);}printf("Case %d:\n",++c);d)printf("%3d",x+y<N?m[x][y]:N*N+1-m[N+~x][N+\~y]);puts("");}}}

Compiler output:
main.c:2:1: warning: data definition has no type or storage class
    2 | c,m[10][10],x,N;main(y){for(;scanf("%d",&N),N;){d)m[x][y]=(x+y)*(x-~y)/2+1+(x+y\&1?x:y);}printf("Case %d:\n",++c);d)printf("%3d",x+y<N?m[x][y]:N*N+1-m[N+~x][N+\~y]);puts("");}}}
      | ^
main.c:2:1: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
main.c:2:3: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
    2 | c,m[10][10],x,N;main(y){for(;scanf("%d",&N),N;){d)m[x][y]=(x+y)*(x-~y)/2+1+(x+y\&1?x:y);}printf("Case %d:\n",++c);d)printf("%3d",x+y<N?m[x][y]:N*N+1-m[N+~x][N+\~y]);puts("");}}}
      |   ^
main.c:2:13: error: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
    2 | c,m[10][10],x,N;main(y){for(;scanf("%d",&N),N;){d)m[x][y]=(x+y)*(x-~y)/2+1+(x+y\&1?x:y);}printf("Case %d:\n",++c);d)printf("%3d",x+y<N?m[x][y]:N*N+1-m[N+~x][N+\~y]);puts("");}}}
      |             ^
main.c:2:15: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int]
    2 | c,m[10][10],x,N;main(y){for(;scanf("%d",&N),N;){d)m[x][y]=(x+y)*(x-~y)/2+1+(x+y\&1?x:y);}printf("Case %d:\n",++c);d)printf("%3d",x+y<N?m[x][y]:N*N+1-m[N+~x][N+\~y]);puts("");}}}
      |               ^
main.c:2:17: error: return type defaults to 'int' [-Wimplicit-int]
    2 | c,m[10][10],x,N;main(y){for(;scanf("%d",&N),N;){d)m[x][y]=(x+y)*(x-~y)/2+1+(x+y\&1?x:y);}printf("Case %d:\n",++c);d)printf("%3d",x+y<N?m[x][y]:N*N+1-m[N+~x][N+\~y]);puts("");}}}
      |                 ^~~~
main.c: In function 'main':
main.c:2:17: error: type of 'y' defaults to 'int' [-Wimplicit-int]
main.c:2:30: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    2 | c,m[10][10],x,N;main(y){for(;scanf("%d",&N),N;){d)m[x][y]=(x+y)*(x-~y)/2+1+(x+y\&1?x:y);}printf("Case %d:\n",++c);d)printf("%3d",x+y<N?m[x][y]:N*N+1-m[N+~x][N+\~y]);puts("");}}}
      |                              ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #define d for(x=0;x<N;x++){for(y=0;y<N;y++
main.c:2:30: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    2 | c,m[10][10],x,N;main(y){for(;scanf("%d",&N),N;){d)m[x][y]=(x+y)*(x-~y)/2+1+(x+y\&1?x:y);}printf("Case %d:\n",++c);d)printf("%3d",x+y<N?m[x][y]:N*N+1-m[N+~x][N+\~y]);puts("");}}}
      |                              ^~~~~
main.c:2:30: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:2:80: error: stray '\' in program
    2 | c,m[10][10],x,N;main(y){for(;scanf("%d",&N),N;){d)m[x][y]=(x+y)*(x-~y)/2+1+(x+y\&1?x:y);}printf("Case %d:\n",++c);d)printf("%3d",x+y<N?m[x][y]:N*N+1-m[N+~x][N+\~y]);puts("");}}}
      |                                                                                ^
main.c:2:90: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    2 | c,m[10][10],x,N;main(y){for(;scanf("%d",&N),N;){d)m[x][y]=(x+y)*(x-~y)/2+1+(x+y\&1?x:y);}printf("Case %d:\n",++c);d)printf("%3d",x+y<N?m[x][y]:N*N+1-m[N+~x][N+\~y]);puts("");}}}
      |                                                                                          ^~~~~~
main.c:2:90: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:2:90: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:2:90: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:2:160: error: stray '\' in program
    2 | c,m[10][10],x,N;main(y){for(;scanf("%d",&N),N;){d)m[x][y]=(x+y)*(x-~y)/2+1+(x+y\&1?x:y);}printf("Case %d:\n",++c);d)printf("%3d",x+y<N?m[x][y]:N*N+1-m[N+~x][N+\~y]);puts("");}}}
      |                                                                                                                                                                ^
main.c:2:166: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
    2 | c,m[10][10],x,N;main(y){for(;scanf("%d",&N),N;){d)m[x][y]=(x+y)*(x-~y)/2+1+(x+y\&1?x:y);}printf("Case %d:\n",++c);d)printf("%3d",x+y<N?m[x][y]:N*N+1-m[N+~x][N+\~y]);puts("");}}}
      |                                                                                                                                                                      ^~~~
main.c:2:166: note: include '<stdio.h>' or provide a declaration of 'puts'