Language: C


#include<stdio.h>
int main(){
	int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
	while(1){
		scanf("%d",&a);
		if(a!=0){
			for(j=0,j<a;j++){
			for(i=0,i<a;i++){
				scanf("%d",&n[j][i]);	
			}
			}
			for(i=0;i<9;i++){
				x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i]
				y[i] = n[i][0]+n[i][1]+n[i][2]+n[i][3]+n[i][4]+n[i][5]+n[i][6]+n[i][7]+n[i][8]
			}
			for(i=0;i<a;i++){
			for(j=o;j<a;j++){
				printf("%5d",n[j][i]);
			}
			printf("%5d",y[i]);
			}
			for(i=0;i<a;i++){
				printf("%5d",x[i]);
			}
			printf("%5d",x[0]+y[0]+x[1]+y[1]+x[2]+y[2]+x[3]+y[3]+x[4]+y[4]+x[5]+y[5]+x[6]+y[6]+x[7]+y[7]+x[8]+y[8])
		}else{
			break;
		}
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    4 |         int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
      |                                            ^
main.c:4:46: error: expected expression before ',' token
    4 |         int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
      |                                              ^
main.c:4:48: error: 'a' undeclared (first use in this function)
    4 |         int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
      |                                                ^
main.c:4:48: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:51: error: 'i' undeclared (first use in this function)
    4 |         int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
      |                                                   ^
main.c:4:54: error: 'j' undeclared (first use in this function)
    4 |         int n[10][10] = {}, x[9] ={}, y[9] {}, a, i, j;
      |                                                      ^
main.c:8:40: error: expected ';' before ')' token
    8 |                         for(j=0,j<a;j++){
      |                                        ^
      |                                        ;
main.c:9:40: error: expected ';' before ')' token
    9 |                         for(i=0,i<a;i++){
      |                                        ^
      |                                        ;
main.c:14:111: error: expected ';' before 'y'
   14 |                                 x[i] = n[0][i]+n[1][i]+n[2][i]+n[3][i]+n[4][i]+n[5][i]+n[6][i]+n[7][i]+n[8][i]
      |                                                                                                               ^
      |                                                                                                               ;
   15 |                                 y[i] = n[i][0]+n[i][1]+n[i][2]+n[i][3]+n[i][4]+n[i][5]+n[i][6]+n[i][7]+n[i][8]
      |                                 ~                                                                              
main.c:18:31: error: 'o' undeclared (first use in this function)
   18 |                         for(j=o;j<a;j++){
      |                               ^
main.c:21:38: error: 'y' undeclared (first use in this function)
   21 |                         printf("%5d",y[i]);
      |                                      ^
main.c:26:128: error: expected ';' before '}' token
   26 |                         printf("%5d",x[0]+y[0]+x[1]+y[1]+x[2]+y[2]+x[3]+y[3]+x[4]+y[4]+x[5]+y[5]+x[6]+y[6]+x[7]+y[7]+x[8]+y[8])
      |                                                                                                                                ^
      |                                                                                                                                ;
   27 |                 }else{
      |                 ~