Language: C

#include<stdio.h>
int main(){
    int i,j,r,c,u,x[11][11],sum = 0,sumr[11] = {},sumc[11] = {};
    scanf("%d %d",&r,&c);
    for( i = 1 ; i <= r ; i += 1 ){
        for( j = 1 ; j <= c ; j += 1){
            scanf("%d",&x[i][j]);
            sumr[i] = sumr[i] + x[i][j];
        }
        sum = sum + sumr[i];
    }
    for( i = 1 ; i <= c ; i += 1){
        for( j = 1 ; j <= r ; j += 1){
            sumc[i] = sumc[i] + x[j][i];
        }
    }
    for( i = 1 ; i <= r + 1 ; i += 1){
        if( i == r + 1 ){
            for( j = 1 ; j <= c + 1 ; j += 1 ){
                if( j == c + 1 ){
                    printf("%d\n",sum);
                }
                printf("%d ",sumc[j]);
            }
        }
        else{
            for( j = 1 ; j <= c + 1 ; j += 1 ){
                if( j == c + 1 ){
                    printf("%d\n",sumr[i]);
                }
                else{
                    printf("%d ",x[i][j]);
                }
            }
        }
    }
    return 0;
}
munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ ./a.out
4 5
1 1 3 4 5
2 2 2 4 5
3 3 0 1 1
2 3 4 4 6
1134514
2224515
330118
2344619
899131756
0munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ vim Spreadsheet.c
munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ gcc Spreadsheet.c
munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ ./a.out
4 5
1 1 3 4 5
2 2 2 4 5
3 3 0 1 1
2 3 4 4 6
1 1 3 4 5 14
2 2 2 4 5 15
3 3 0 1 1 8
2 3 4 4 6 19
8 9 9 13 17 56
0 munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ cat Spreadsheet.c
#include<stdio.h>
int main(){
    int i,j,r,c,u,x[11][11],sum = 0,sumr[11] = {},sumc[11] = {};
    scanf("%d %d",&r,&c);
    for( i = 1 ; i <= r ; i += 1 ){
        for( j = 1 ; j <= c ; j += 1){
            scanf("%d",&x[i][j]);
            sumr[i] = sumr[i] + x[i][j];
        }
        sum = sum + sumr[i];
    }
    for( i = 1 ; i <= c ; i += 1){
        for( j = 1 ; j <= r ; j += 1){
            sumc[i] = sumc[i] + x[j][i];
        }
    }
    for( i = 1 ; i <= r + 1 ; i += 1){
        if( i == r + 1 ){
            for( j = 1 ; j <= c + 1 ; j += 1 ){
                if( j == c + 1 ){
                    printf("%d\n",sum);
                }
                printf("%d ",sumc[j]);
            }
        }
        else{
            for( j = 1 ; j <= c + 1 ; j += 1 ){
                if( j == c + 1 ){
                    printf("%d\n",sumr[i]);
                }
                else{
                    printf("%d ",x[i][j]);
                }
            }
        }
    }
    return 0;
}

Compiler output:
main.c:39:7: error: stray '@' in program
   39 | munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ ./a.out
      |       ^
main.c:39:1: error: unknown type name 'munvei'
   39 | munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ ./a.out
      | ^~~~~~
main.c:39:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-' token
   39 | munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ ./a.out
      |              ^
main.c:39:15: error: invalid suffix "R4VKLM" on integer constant
   39 | munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ ./a.out
      |               ^~~~~~~~
main.c:50:1: error: invalid suffix "munvei" on integer constant
   50 | 0munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ vim Spreadsheet.c
      | ^~~~~~~
main.c:50:8: error: stray '@' in program
   50 | 0munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ vim Spreadsheet.c
      |        ^
main.c:50:16: error: invalid suffix "R4VKLM" on integer constant
   50 | 0munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ vim Spreadsheet.c
      |                ^~~~~~~~
main.c:51:7: error: stray '@' in program
   51 | munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ gcc Spreadsheet.c
      |       ^
main.c:51:15: error: invalid suffix "R4VKLM" on integer constant
   51 | munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ gcc Spreadsheet.c
      |               ^~~~~~~~
main.c:52:7: error: stray '@' in program
   52 | munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ ./a.out
      |       ^
main.c:52:15: error: invalid suffix "R4VKLM" on integer constant
   52 | munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ ./a.out
      |               ^~~~~~~~
main.c:63:9: error: stray '@' in program
   63 | 0 munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ cat Spreadsheet.c
      |         ^
main.c:63:17: error: invalid suffix "R4VKLM" on integer constant
   63 | 0 munvei@LAPTOP-00R4VKLM:~/kutpg/aoj$ cat Spreadsheet.c
      |                 ^~~~~~~~