criyle/codenet-compile-errors huggingface dataset:
Language: C

#include <stdio.h>

int main( void ) 
{
	int r,c;
	int matrix[101][101];
	int i,j;
	int res=0,sum=0;
	
	scanf( "%d%d", &r, &c );
	for( i=0; i<r; i++ ) {
		for( j=0; j<c; j++ ) {
			scanf( "%d", &matrix[i][j] );
		}
	}
	
	
	sum=0;
	for( i=0; i<r; i++ ) {
		res=0;
		for( j=0; j<c; j++ ) {
			printf( "%d ", matrix[i][j] );
			res+=matrix[i][j];
		}
		sum+=res;
		if( r-1 == i ) {
			printf( "%d %d\n", res, sum );
		} else {
			printf( "%d\n", res );	
		}
	}
	

	return 0;
}javascript:void(0)

Compiler output:
main.c:35:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
   35 | }javascript:void(0)
      |            ^
Language: C

#include <stdio.h>

int main(void){

  int r,c;
  int hyou[][100] = {0};
  register int i,j;
  int sum,total = 0;

  scanf("%d %d",&n,&c);
  for(i = 0;i < n;i++){
    for(j = 0;j < c;j++){
      scanf("%d",hyou[i][j]);
    }
  }
  for(i = 0;i < n;i++){
    sum = 0;
    for(j = 0;j < c;j++){
      printf("%d ",hyou[i][j]);
      sum += hyou[i][j];
    }
    printf("%d",sum);
    total += sum;
  }
  for(i = 0;i < n;i++){
    sum = 0;
    for(j = 0;j < c;j++){
      sum += hyou[j][i];
    }
    print("%d ",sum);
    total += sum;
  }
  printf("%d",total);
}

Compiler output:
main.c: In function 'main':
main.c:10:18: error: 'n' undeclared (first use in this function)
   10 |   scanf("%d %d",&n,&c);
      |                  ^
main.c:10:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:30:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   30 |     print("%d ",sum);
      |     ^~~~~
      |     printf
Language: C

#include <stdio.h>

int main(void){

  int r,c;
  int hyou[][100] = {0};
  register int i,j;
  int sum,total = 0;

  scanf("%d %d",&r,&c);
  for(i = 0;i < r;i++){
    for(j = 0;j < c;j++){
      scanf("%d",hyou[i][j]);
    }
  }
  for(i = 0;i < r;i++){
    sum = 0;
    for(j = 0;j < c;j++){
      printf("%d ",hyou[i][j]);
      sum += hyou[i][j];
    }
    printf("%d",sum);
    total += sum;
  }
  for(i = 0;i < r;i++){
    sum = 0;
    for(j = 0;j < c;j++){
      sum += hyou[j][i];
    }
    print("%d ",sum);
    total += sum;
  }
  printf("%d",total);
}

Compiler output:
main.c: In function 'main':
main.c:30:5: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   30 |     print("%d ",sum);
      |     ^~~~~
      |     printf
Language: C

#include <stdio.h>

int main(void){

  int r,c;
  int hyou[][] = {0};
  register int i,j;
  int sum,total = 0;

  scanf("%d %d",&r,&c);
  for(i = 0;i < r;i++){
    for(j = 0;j < c;j++){
      scanf("%d",hyou[i][j]);
    }
  }
  for(i = 0;i < r;i++){
    sum = 0;
    for(j = 0;j < c;j++){
      printf("%d ",hyou[i][j]);
      sum += hyou[i][j];
    }
    printf("%d",sum);
    total += sum;
  }
  for(i = 0;i < r;i++){
    sum = 0;
    for(j = 0;j < c;j++){
      sum += hyou[j][i];
    }
    printf("%d ",sum);
    total += sum;
  }
  printf("%d",total);
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: array type has incomplete element type 'int[]'
    6 |   int hyou[][] = {0};
      |       ^~~~
main.c:6:7: note: declaration of 'hyou' as multidimensional array must have bounds for all dimensions except the first
Language: C

#include <stdio.h>

int main(void){

  int r,c;
  int hyou[][];
  register int i,j;
  int sum,total = 0;

  scanf("%d %d",&r,&c);
  for(i = 0;i < r;i++){
    for(j = 0;j < c;j++){
      scanf("%d",hyou[i][j]);
    }
  }
  for(i = 0;i < r;i++){
    sum = 0;
    for(j = 0;j < c;j++){
      printf("%d ",hyou[i][j]);
      sum += hyou[i][j];
    }
    printf("%d",sum);
    total += sum;
  }
  for(i = 0;i < r;i++){
    sum = 0;
    for(j = 0;j < c;j++){
      sum += hyou[j][i];
    }
    printf("%d ",sum);
    total += sum;
  }
  printf("%d",total);
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: array type has incomplete element type 'int[]'
    6 |   int hyou[][];
      |       ^~~~
main.c:6:7: note: declaration of 'hyou' as multidimensional array must have bounds for all dimensions except the first
Language: C

#include<stdio.h>
int main(){
	int hyo[101][101];
	int r,c;
	int i,j;
	int x;
	scanf("%d%d",&r,&c);
	for(i=0;i<r;i++)
	{
		for(j=0;j<c;j++)
		{
			scanf("%d",&hyo[i][j]);
		}

	}
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
	hyo[i][c+1]+=hyo[i][j];
	}
	for(j=0;j<c;j++){
		for(i=0;i<r;i++){
	hyo[r+1][j]+=hyo[i][j];
	}
	for(i=0;i<r+1;i++){
		for(j=0;j<c+1;j++){
			if(j<c){printf("%d ");}
			else if(j==c){printf("%d\n");}
		}

	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:32:1: error: expected declaration or statement at end of input
   32 | }
      | ^
main.c:32:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
int main(){
	int hyo[101][101];
	int r,c;
	int i,j;
	scanf("%d%d",&r,&c);
	for(i=0;i<r;i++)
	{
		for(j=0;j<c;j++)
		{
			scanf("%d",&hyo[i][j]);
		}

	}
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
	hyo[i][c+1]+=hyo[i][j];
	}
	for(j=0;j<c;j++){
		for(i=0;i<r;i++){
	hyo[r+1][j]+=hyo[i][j];
	}
	for(i=0;i<r+1;i++){
		for(j=0;j<c+1;j++){
			if(j<c){printf("%d ");}
			else if(j==c){printf("%d\n");}
		}

	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:1: error: expected declaration or statement at end of input
   31 | }
      | ^
main.c:31:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
int main(){
	int hyo[100][100];
	int r,c;
	int i,j;
	scanf("%d%d",&r,&c);
	for(i=0;i<r;i++)
	{
		for(j=0;j<c;j++)
		{
			scanf("%d",&hyo[i][j]);
		}

	}
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
	hyo[i][c+1]+=hyo[i][j];
	}
	for(j=0;j<c;j++){
		for(i=0;i<r;i++){
	hyo[r+1][j]+=hyo[i][j];
	}
	for(i=0;i<r+1;i++){
		for(j=0;j<c+1;j++){
			if(j<c){printf("%d ");}
			else if(j==c){printf("%d\n");}
		}

	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:31:1: error: expected declaration or statement at end of input
   31 | }
      | ^
main.c:31:1: error: expected declaration or statement at end of input
Language: C

#include<stdio.h>
int main()
{
  int r,c,i,j,ans=0;
  scanf("%d %d",&r,&c);
  hyo[r+1][c+1];
  for(i=0;i<r;i++){
    for(j=0;j<c;j++){
      scanf("%d",&hyo[i][j]);
    }
  }
  //yoko
  for(i=0;i<r;i++){
    for(j=0;j<c;j++){
      hyo[i][c+1]+=hyo[i][j];
    }
  }
  //tate
  for(i=0;i<r;i++){
    for(j=0;j<c;j++){
      hyo[r+1][j]+=hyo[i][j];
    }
  }
  //gokei
  for(i=0;i<r;i++){
    ans+=hyo[i+1][c];
  }
  //print
  for(i=0;i<r+1;i++){
    for(j=0;j<c+1;j++){
      if(i==r)printf("%d\n");
      else printf("%d ",hyo[i][j]);
    }
  }
  printf("\n");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: 'hyo' undeclared (first use in this function)
    6 |   hyo[r+1][c+1];
      |   ^~~
main.c:6:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int
main(int argc, char *argv[])
{
	int r, c;
	int i, j, *rsum, csum, tmp;

	scanf("%d %d", &r, &c);
	rsum = (int *)malloc(c * sizeof(int));
	for (i = 0; i < r, i++) {
		csum = 0;
		for (j = 0; j < c; j++) {
			scanf("%d", &tmp);
			csum += tmp;
			rsum[j] += tmp;
			printf("%d ", tmp);
		}
		printf("%d\n", csum);
	}
	tmp = 0;
	for (i = 0; i < c; i++) {
		printf("%d ", rsum[i]);
		tmp += rsum[i];
	}
	printf("%d\n", tmp);
	

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:23: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
   10 |         rsum = (int *)malloc(c * sizeof(int));
      |                       ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | 
main.c:10:23: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
   10 |         rsum = (int *)malloc(c * sizeof(int));
      |                       ^~~~~~
main.c:10:23: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:11:31: error: expected ';' before ')' token
   11 |         for (i = 0; i < r, i++) {
      |                               ^
      |                               ;
Language: C

#include <stdio.h>
int main(void){
????????int x;
    int i;
    int j;
    int r;
    int c;
    int temp[200][200]={0};
????????scanf("%d %d",&r,&c);
????????for(j=0;j<r;j++){
????????????????for(i=0;i<c;i++){
????????????????????????scanf("%d",&x);
????????????????????????temp[i][j]+=x;
????????????????}
????????}
????????for(j=0;j<r;j++){
????????????????for(i=0;i<c;i++){
????????????????????????temp[c][j]+=temp[i][j];
????????????????}
????????}
????????for(i=0;i<=c;i++){
????????????????for(j=0;j<r;j++){
????????????????????????temp[i][r]+=temp[i][j];
????????????????}
????????}
????????for(j=0;j<=r;j++){
????????????????for(i=0;i<=c;i++){
????????????????????????printf("%d", temp[i][j]);
????????????????????????if(i!=c) printf(" ");
????????????????}
????????????????printf("\n");
????????}????
????????return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:1: error: expected expression before '?' token
    3 | ????????int x;
      | ^
main.c:9:1: error: expected expression before '?' token
    9 | ????????scanf("%d %d",&r,&c);
      | ^
main.c:10:1: error: expected expression before '?' token
   10 | ????????for(j=0;j<r;j++){
      | ^
Language: C

#include<stdio.h>
int main(void){
int r,c,i,f,asum=0,sum=0,n;
int z[100];
scanf("%d %d",&r,&c);
for(i=0;i<r;i++){
for(f=0;f<c;f++){
scanf("%d",&n);
z[f]+=n;
sum+=n;
printf("%d ",n);
}
printf("%d\n",sum);
}
for(i=0;i<r;i++){
if(i!=r-1){
asum+=z[i];
printf("%d ",z[i]);
}else{printf("%d\n",asum);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: C

#include<stdio.h>

int main(){

	int r,c,i,j;
	int a[100][100]={0};

	scanf("%d %d",&r,&c);
	for(i=0; i<r; i++){
		for(j=0; j<c; j++){
			scanf("%d",&a[i][j]);
		}
	}

	for(i=0; i<r; i++){
		for(j=0; j<c; j++){
			a[i][c] += a[i][j];
			a[r][j] += a[i][j];
		}
	}
	for(i=0; i<r+1; i++){
		a[r][c] += a[i][c]
	}

	for(i=0; i<r+1; i++){
		for(j=0; j<c+1; j++){
			if(j<c) printf("%d ",a[i][j]);
			else printf("%d\n",a[i][j]);
		}
	}
	
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:35: error: expected ';' before '}' token
   22 |                 a[r][c] += a[i][c]
      |                                   ^
      |                                   ;
   23 |         }
      |         ~
Language: C

#include <stdio.h>

int main(){
    int r, c, i, j;
    int v[100][100], r[100] = {}, c[100] = {}, sum = 0;
    scanf("%d %d", &r, &c);
    for (i = 0; i < r; i++) 
        for (j = 0; j < c; j++){
            scanf("%d", &v[i][j]);
            r[i] += v[i][j];
            c[j] += v[i][j];
            sum += v[i][j];
    }
    for (i = 0; i < r; i++){
        for (j = 0; j < c; j++)
            printf(" %d", v[i][j]);
        printf(" %d\n", r[i]);
    }
    for (i = 0; i < c; i++)
        printf(" %d", c[i]);
    printf(" %d\n", sum);
    
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:22: error: conflicting types for 'r'; have 'int[100]'
    5 |     int v[100][100], r[100] = {}, c[100] = {}, sum = 0;
      |                      ^
main.c:4:9: note: previous declaration of 'r' with type 'int'
    4 |     int r, c, i, j;
      |         ^
main.c:5:35: error: conflicting types for 'c'; have 'int[100]'
    5 |     int v[100][100], r[100] = {}, c[100] = {}, sum = 0;
      |                                   ^
main.c:4:12: note: previous declaration of 'c' with type 'int'
    4 |     int r, c, i, j;
      |            ^
Language: C

#include<stdio.h>

int main(){
	
int rc[100][100]={0},R,C,i,j,sum=0,sum2=0,maxsum=0;

scanf("%d %d",&R,&C);
for(j=1;j<=R;j++){
	for(i=1;i<=C;i++){
		scanf("%d",&rc[j][i]);
	}
}

for(j=1;j<=R;j++){
	for(i=1;i<=C;i++){
		sum=sum+rc[j][i];
	}
	rc[j][C+1]=sum;
	sum=0;
}

for(i=1;i<=C;i++){
	for(j=1;j<=R;j++){
		sum2=sum2+rc[j][i];
	}
	rc[R+1][i]=sum2;
	sum2=0;
}

for(j=1;j<=R+1;j++){
		maxsum=maxsum+rc[j][C+1];
	}
rc[R+1][C+1]=maxsum;


for(j=1;j<=R+1;j++){
	for(i=1;i<=C+1;i++){
		if(i!=C+1){
		printf("%d ",rc[j][i]);
		}
		else{printf("%d",rc[j][i]);}
	}
printf("\n");
}


return 0;

Compiler output:
main.c: In function 'main':
main.c:47:1: error: expected declaration or statement at end of input
   47 | return 0;
      | ^~~~~~
Language: C

#include <stdio.h>

int main(int argc, const char * argv[])
{
    int i,j,r,c;
    int a[1000][1000];
    int sum[1000][1000];
    
    scanf("%d %d",&r,&c);
    
    for(i=0;i<r;i++){
        for(j=0;j<c;j++){
            scanf("%d",&a[i][j]); //?????\???
        }
    }
    
    for(j=0;j<c;j++){
        for(i=0;i<r;i++){
            sum[i][c]+=a[i][j]; //????????????c?????§?????????????¨?
        }
    }
    
    for(i=0;i<r;i++){
        for(j=0;j<c;j++){
            sum[r][j]+=a[i][j]; //????????????i?????§??????????¨????
        }
    }
    
    for(i=0;i<r;i++){
        sum[r][c]+=a[i][c]; //????¨????????¨?????¨????
    }
    
    for(i=0;i<r+1;i++){
        for(j=0;j<c+1;j++){
            if(j==c){
                printf("%d\n",sum[i][j]);
            }else{
                printf("%d ",a[i][j]);
            }
        }
    }
    
    return 0;

Compiler output:
main.c: In function 'main':
main.c:43:5: error: expected declaration or statement at end of input
   43 |     return 0;
      |     ^~~~~~
Language: C

#include<stdio.h>

int main(){
	int r,c,;
	int i,j,k,sum1,sum2,sum3;
	 int sheet[r+1][c+1];
	
   	scanf("%d%d",&r,&c);
	sum1 = 0;
	for( i = 0; i < r; i++)
	{
		sum2 = 0;
		for( j = 0; j < c; j++)
        {
			scanf("%d",&sheet[i][j]);
			sum2 += sheet[i][j];
             
			if(i== r-1)
        	{
        		sum3 = 0;
        		for( k = 0; k < r; k++)
        		sum3 += sheet[k][j];
        		sheet[k][j]= sum3;
        	}
        }
		sheet[i][j] =  sum2;
		sum1 +=  sum2 =0;
         
    }
    sheet[i][j]=sum1;
     
    for(i=0;i<r+1;i++)
    {
        for(j=0;j<c+1;j++)
        {
            if(j!=c)
                printf("%d ",sheet[i][j]);
            else
                printf("%d",sheet[i][j]);
        }
        printf("\n");
    }
     
     
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:17: error: expected identifier or '(' before ';' token
    4 |         int r,c,;
      |                 ^
Language: C

#include<stdio.h>

int main(void) {
int r,c,e;
int i,j;

scanf("%d %d", &r, &c);

int mat[r][c];
int ans1 = 0;
int ans2[c+1] = {0};

for (i = 0; i < r; i++) {
for (j = 0; j < c; j++) {
scanf("%d", &e);
printf("%d ", e);
ans1 += e;
ans2[j] += e;
}
printf("%d\n");
}
for (i = 0; i < c; i++) {
printf("%d ", ans2[i]);
ans[c] = ans2[i];
}
printf("%d\n", ans[c]);

return (0);
}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: variable-sized object may not be initialized except with an empty initializer
   11 | int ans2[c+1] = {0};
      |                 ^
main.c:24:1: error: 'ans' undeclared (first use in this function); did you mean 'ans2'?
   24 | ans[c] = ans2[i];
      | ^~~
      | ans2
main.c:24:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void) {
int r,c,e;
int i,j;

scanf("%d %d", &r, &c);

int mat[r][c];
int ans1 = 0;
int ans2[c+1] = {0};

for (i = 0; i < r; i++) {
for (j = 0; j < c; j++) {
scanf("%d", &e);
printf("%d ", e);
ans1 += e;
ans2[j] += e;
}
printf("%d\n");
}
for (i = 0; i < c; i++) {
printf("%d ", ans2[i]);
ans[c] = ans2[i];
}
printf("%d\n", ans2[c]);

return (0);
}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: variable-sized object may not be initialized except with an empty initializer
   11 | int ans2[c+1] = {0};
      |                 ^
main.c:24:1: error: 'ans' undeclared (first use in this function); did you mean 'ans2'?
   24 | ans[c] = ans2[i];
      | ^~~
      | ans2
main.c:24:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void) {
int r,c,e;
int i,j;

scanf("%d %d", &r, &c);

int mat[r][c];
int ans1 = 0;
int ans2[c+1] = 0;

for (i = 0; i < r; i++) {
for (j = 0; j < c; j++) {
scanf("%d", &e);
printf("%d ", e);
ans1 += e;
ans2[j] += e;
}
printf("%d\n");
}
for (i = 0; i < c; i++) {
printf("%d ", ans2[i]);
ans[c] = ans2[i];
}
printf("%d\n", ans2[c]);

return (0);
}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: variable-sized object may not be initialized except with an empty initializer
   11 | int ans2[c+1] = 0;
      |                 ^
main.c:24:1: error: 'ans' undeclared (first use in this function); did you mean 'ans2'?
   24 | ans[c] = ans2[i];
      | ^~~
      | ans2
main.c:24:1: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void) {
int r,c,e;
int i,j;

scanf("%d %d", &r, &c);

int mat[r][c];
int ans1 = 0;
int ans2[c+1] = {0};

for (i = 0; i < r; i++) {
for (j = 0; j < c; j++) {
scanf("%d", &e);
printf("%d ", e);
ans1 += e;
ans2[j] += e;
}
printf("%d\n");
}
for (i = 0; i < c; i++) {
printf("%d ", ans2[i]);
ans2[c] = ans2[i];
}
printf("%d\n", ans2[c]);

return (0);
}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: variable-sized object may not be initialized except with an empty initializer
   11 | int ans2[c+1] = {0};
      |                 ^
Language: C

#include <stdio.h>
int main(void)
{
	int r,c,hairetu[101][101];
	
	int i,j,k,l=0,m=0,o=0;

	scanf("%d %d",&r,&c);

	for(i=0;i<r;i++)
	{
		for(j=0;j<c;j++)
		{
			scanf("%d",&k);

			hairetu[i][j] = k;

			l = l+k;

			
		}

		hairetu[i][j+1] = l;

		m = m+l;

		l=0;
	}



	for(i=0;i<r;i++)
	{
		for(j=0;j<c;j++)
		{
			printf("%d",hairetu[i][j]);
			printf(" ");
		
		}
	
		 printf("%d\n",hairetu[i][j+1]);
	}

	for(j=0;j<c;j++)
	{
		for(i=0;i<r;i++)
		{
			o = o + hairetu[i][j] ;
		}
	
		printf("%d",o);
		printf(" ");
		o = 0;
	
	}

	printf("%d\n",m);



	return 0;

Compiler output:
main.c: In function 'main':
main.c:61:9: error: expected declaration or statement at end of input
   61 |         return 0;
      |         ^~~~~~
Language: C

int main(void)
{
	int r, c;
	scanf("%d %d", &r, &c);

	int sp[r + 1][c + 1];
	for (int i = 0; i < r + 1; ++i) {
		for (int j = 0; j < c + 1; ++j) {
			sp[i][j] = 0;
		}
	}
	for (int i = 0; i < r; ++i) {
		for (int j = 0; j < c; ++j) {
			scanf("%d", &sp[i][j]);
			sp[r][j] += sp[i][j];
			sp[i][c] += sp[i][j];
		}
		sp[r][c] += sp[i][c];
	}

	for (int i = 0; i < r + 1; ++i) {
		for (int j = 0; j < c + 1; ++j) {
			printf("%d ", sp[i][j]);
		}
		printf("\n");
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |         scanf("%d %d", &r, &c);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void)
main.c:4:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |         scanf("%d %d", &r, &c);
      |         ^~~~~
main.c:4:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:23:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   23 |                         printf("%d ", sp[i][j]);
      |                         ^~~~~~
main.c:23:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:23:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:25:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   25 |                 printf("\n");
      |                 ^~~~~~
main.c:25:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

include <stdio.h>
int main (void)
{
	int gyo,retu;
	int a,b,c,gou;
	long long gr[101][101];

	scanf("%d %d",&gyo,&retu);

	for(a=0;a<=gyo;a++)//?????????
	{
		for(b=0;b<=retu;b++)
		{
			gr[a][b]=0;
		}
	}

	for(a=0;a<gyo;a++)//??\???
	{
		for(b=0;b<retu;b++)
		{
			scanf("%d",&gr[a][b]);
		}
	}

	gou=0;
	for(a=0;a<gyo;a++)//????????????
	{
		gou=0;
		for(b=0;b<retu;b++)
		{
			gou= gr[a][b]+gou;
		}
		gr[a][retu]=gou;
	}

	gou=0;
	for(b=0;b<retu;b++)
	{
		gou=0;
		for(a=0;a<gyo;a++)//????????????
		{
			gou=gr[a][b]+gou;
		}
		gr[gyo][b]=gou;
	}

	
	gr[gyo][retu]=0;
	gou=0;
	for(a=0;a<retu;a++)
	{
		gou = gou + gr[a][retu];
	}
	gr[gyo][retu]= gou;

	for(a=0;a<=gyo;a++)
	{
		for(b=0;b<=retu;b++)
		{
			printf("%d",gr[a][b]);
			if(b!=retu)
			{
				printf(" ");
			}
			
		}
		printf("\n");
		
	}
	



	return 0;
}

Compiler output:
main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include <stdio.h>
      |         ^
Language: C

#include <stdio.h>
int main(void)
{
	int r,c,hairetu[100][100],i,j,k,l=0,m=0,o=0;

	scanf("%d %d",&r,&c);

	for(i=0;i<r;i++)
	{
		for(j=0;j<c;j++)
		{
			scanf("%d",&k);

			hairetu[i][j] = k;

			l = l+k;

			
		}

		hairetu[i][j+1] = l;

		m = m+l;

		l=0;
	}



	for(i=0;i<r;i++)
	{
		for(j=0;j<c;j++)
		{
			printf("%d",hairetu[i][j]);
			printf(" ");
		
		}
	
		 printf("%d\n",hairetu[i][j+1]);
	}

	for(j=0;j<c;j++)
	{
		for(i=0;i<r;i++)
		{
			o = o + hairetu[i][j] ;
		}
	
		printf("%d",o);
		printf(" ");
		o = 0;
	
	}

	printf("%d\n",m);

	m=0;

	return 0;

Compiler output:
main.c: In function 'main':
main.c:59:9: error: expected declaration or statement at end of input
   59 |         return 0;
      |         ^~~~~~
Language: C

#include <stdio.h>



int main(void) {

	// 1_7-C Spreadsheet
	
	int r,c;
	long tbl[101][101];
	int i,j;]

	scanf("%d",&r);
	scanf("%d",&c);

	for(i=0; i<(r+1); i++){
		tbl[i][c] = 0;
	}
	for(i=0; i<(c+1); i++){
		tbl[r][i] = 0;
	}
	
	for(i=0; i<r; i++){
		for(j=0; j<c; j++){
			scanf("%ld",&tbl[i][j]);
			tbl[r][j] += tbl[i][j];
			tbl[i][c] += tbl[i][j];
			tbl[r][c] += tbl[i][j];
		}
	}
	for(i=0; i<(r+1); i++){
		for(j=0; j<(c+1); j++){
			printf("%ld",tbl[i][j]);
			if(j<c){
				putchar(' ');
			}else{
				putchar('\n');
			}
		}
	}

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:11:17: error: expected statement before ']' token
   11 |         int i,j;]
      |                 ^
Language: C

#include <stdio.h>

int main(void)
{
    int r, c;
    int cell[101][101] = 0;
    int i, j;
    scanf("%d %d", &r, &c);
    for(i=0;i<r;i++){
        for(j=0;j<c;j++){
            scanf("%d", &cell[i][j]);
            cell[i][c] += cell[i][j];
            cell[r][j] += cell[i][j];
            cell[r][c] += cell[i][j];
        }
    }
    
    for(i=0;i<r+1;i++){
        for(j=0;j<c+1;j++){
            printf("%d", cell[i][j]);
            if(j==c){
                printf("\n");
            }
            else{
                printf(" ");
            }
        }
    }
        
    return 0; 
}
    

Compiler output:
main.c: In function 'main':
main.c:6:26: error: invalid initializer
    6 |     int cell[101][101] = 0;
      |                          ^
Language: C

#include<stdio.h>

int main(void){

	int i,j,k,l,i2,j2;
	int a[101][101];
	int r,c;

	scanf("%d %d ",&r,&c);
	
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			scanf("%d",&a[i][j]);
		}
	}

	for(k=0;k<r;k++){
		for(l=0;l<c;l++){
			printf(" %d",a[k][l]);
			c=c+a[k][l];
		}
	printf(" %d\n",c);
	c=0;
	}
	for(j2=0;j2<c;j2++){
		for(i2=0;i2<r;i2++){
			d=d+[i2][j2];
		}	
		printf(" %d",d);
		d=0;
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:27:25: error: 'd' undeclared (first use in this function)
   27 |                         d=d+[i2][j2];
      |                         ^
main.c:27:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:27:29: error: expected expression before '[' token
   27 |                         d=d+[i2][j2];
      |                             ^
Language: C

#include<stdio.h>

int main(void){

	int i,j,k,l,i2,j2;
	int a[101][101];
	int r,c;

	scanf("%d %d ",&r,&c);
	
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			scanf("%d",&a[i][j]);
		}
	}

	for(k=0;k<r;k++){
		for(l=0;l<c;l++){
			printf(" %d",a[k][l]);
			c=c+a[k][l];
		}
	printf(" %d\n",c);
	c=0;
	}
	for(j2=0;j2<c;j2++){
		for(i2=0;i2<r;i2++){
			d=d+a[i2][j2];
		}	
		printf(" %d",d);
		d=0;
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:27:25: error: 'd' undeclared (first use in this function)
   27 |                         d=d+a[i2][j2];
      |                         ^
main.c:27:25: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){

	int i,j,k,l,i2,j2;
	int a[101][101]={0};
	int r,d;

	scanf("%d %d ",&r,&c);
	
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			scanf("%d",&a[i][j]);
		}
	}

	for(k=0;k<r;k++){
		for(l=0;l<c;l++){
			printf(" %d",a[k][l]);
			a[k][c]=a[k][c]+a[k][l];
		}
	printf(" %d\n",c);
	c=0;
	}
	for(j2=0;j2<=c;j2++){
		for(i2=0;i2<r;i2++){
			d=d+a[i2][j2];
		}	
		printf(" %d",d);
		d=0;
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:28: error: 'c' undeclared (first use in this function)
    9 |         scanf("%d %d ",&r,&c);
      |                            ^
main.c:9:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){

	int i,j,k,l,i2,j2;
	int a[101][101]={0};
	int r,c,d;

	scanf("%d %d ",&r,&c);
	
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			scanf("%d",&a[i][j]);
		}
	}

	for(k=0;k<r;k++){
		for(l=0;l<c;l++){
			printf("%d ",a[k][l]);
			a[k][c]=a[k][c]+a[k][l];
		}
	printf("%d\n",c);
	c=0;
	}
	for(j2=0;j2<=c;j2++){
		for(i2=0;i2<r;i2++){
			d=d+a[i2][j2];
		}
		if(j2 != c){	
			printf("%d ",d);
			d=0;
		}
		else{
			printf("%d\n",d)
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:34:41: error: expected ';' before '}' token
   34 |                         printf("%d\n",d)
      |                                         ^
      |                                         ;
   35 |                 }
      |                 ~
Language: C

#include <stdio.h>
#include "MINE.h"

int main(){
	int r,c;
	int a[101][101]={};
	
	//??\???
	do{
		printf("");
		scanf("%d %d",&r,&c);
	}while(!(r>=1 && r<=100 && c>=1 && c<=100));
	
	int s,t;
	int b;
	for(s=0;s<r;s++){
		do{
			b=1;
			printf("");
			for(t=0;t<c;t++){
				scanf("%d ",&a[s][t]);
				if(!(a[s][t]>=0 && a[s][t]<=100))b=0;
			}
		}while(b==0);
	}
	
	//??????
	for(s=0;s<=r;s++){
		for(t=0;t<=c;t++){
			if(s==r){
				for(b=0;b<s;b++){
					a[s][t]+=a[b][t];
				}
			}else if(t==c){
				for(b=0;b<t;b++){
					a[s][t]+=a[s][b];
				}
			}
			printf("%d ",a[s][t]);
		}
		printf("\n");
	}
	return 0;
}

Compiler output:
main.c:2:10: fatal error: MINE.h: No such file or directory
    2 | #include "MINE.h"
      |          ^~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(void)
{
  int n = 0;
  int m = 0;
  int a[100][100] = {{0}};
  int i, j;
  int sum = 0;
  
  scanf("%d %d", &n, &m);

  for(i = 0; i < n; i++){
    for(j = 0; j < m; j++)
      scanf("%d ", &a[i][j]);
  }

  for(i = 0; i < n; i++){
    for(j = 0; j < m; j++)
      sum += a[i][j];
    a[i - 1][j] = sum;
    sum = 0;
  }

  for(i = 0; i < m; i++){
    for(j = 0; j < n; j++)
      sum += a[j][i];
    a[j][i - 1] = sum;
    sum = 0;
  }

  for(i = 0; i <= m; i++)
      sum += a[n][i];
    a[n][i] = sum;;
  }

  for(i = 0; i <= n; i++){
    for(j = 0; j <= m; j++)
      printf("%d ", a[i][j]);
    putchar('\n');
  }
  

  return 0;
}

Compiler output:
main.c:37:3: error: expected identifier or '(' before 'for'
   37 |   for(i = 0; i <= n; i++){
      |   ^~~
main.c:37:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
   37 |   for(i = 0; i <= n; i++){
      |                ^~
main.c:37:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   37 |   for(i = 0; i <= n; i++){
      |                       ^~
main.c:44:3: error: expected identifier or '(' before 'return'
   44 |   return 0;
      |   ^~~~~~
main.c:45:1: error: expected identifier or '(' before '}' token
   45 | }
      | ^
Language: C

#include <stdio.h>

int main(void)
{
  int n = 0;
  int m = 0;
  int a[100][100] = {{0}};
  int i, j;
  int sum = 0;
  
  scanf("%d %d", &n, &m);

  for(i = 0; i < n; i++){
    for(j = 0; j < m; j++)
      scanf("%d ", &a[i][j]);
  }

  for(i = 0; i < n; i++){
    for(j = 0; j < m; j++)
      sum += a[i][j];
    a[i - 1][j] = sum;
    sum = 0;
  }

  for(i = 0; i < m; i++){
    for(j = 0; j < n; j++)
      sum += a[j][i];
    a[j][i - 1] = sum;
    sum = 0;
  }

  for(i = 0; i <= m; i++)
      sum += a[n][i];
    a[n][i] = sum;
  }

  for(i = 0; i <= n; i++){
    for(j = 0; j <= m; j++)
      printf("%d ", a[i][j]);
    putchar('\n');
  }
  

  return 0;
}

Compiler output:
main.c:37:3: error: expected identifier or '(' before 'for'
   37 |   for(i = 0; i <= n; i++){
      |   ^~~
main.c:37:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token
   37 |   for(i = 0; i <= n; i++){
      |                ^~
main.c:37:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   37 |   for(i = 0; i <= n; i++){
      |                       ^~
main.c:44:3: error: expected identifier or '(' before 'return'
   44 |   return 0;
      |   ^~~~~~
main.c:45:1: error: expected identifier or '(' before '}' token
   45 | }
      | ^
Language: C

#include <stdio.h>
int main(){

  int r,c,sheet[100][100];

  scanf("%d %d",&r,&c);

for

  scanf

Compiler output:
main.c: In function 'main':
main.c:10:3: error: expected '(' before 'scanf'
   10 |   scanf
      |   ^~~~~
      |   (
main.c:10:3: error: expected declaration or statement at end of input
   10 |   scanf
      |   ^~~~~
Language: C

#include<stdio.h>
int main(void){
	int r,c,i,j;
	scanf("%d %d",&r,&c);
	int **a;
	a = (int **)malloc((r+1) * sizeof(int *));
	for(i=0;i<=c;i++){
		a[i] = (int *)malloc((c+1)*sizeof(int));
	}
	for(i=0;i<=r;i++){
		for(j=0;j<=c;j++){
			a[i][j] = 0;
		}
	}
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			scanf("%d "&a[i][j]);
		}
	}
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			a[i][c+1] += a[i][j];
			a[r+1][j] += a[i][j];
			a[r+1][c+1] += a[i][j];
		}
	}
	for(i=0;i<=r;i++){
		for(j=0;j<=c;j++){
			if (j != c)printf("%d ",a[i][j]);
			else printf("%d\n",a[i][j]);
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:21: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
    6 |         a = (int **)malloc((r+1) * sizeof(int *));
      |                     ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | int main(void){
main.c:6:21: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
    6 |         a = (int **)malloc((r+1) * sizeof(int *));
      |                     ^~~~~~
main.c:6:21: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:17:36: error: invalid operands to binary & (have 'char *' and 'int')
   17 |                         scanf("%d "&a[i][j]);
      |                               ~~~~~^~~~~~~~
      |                               |         |
      |                               char *    int
Language: C

#include<stdio.h>
int main(void){
	int r,c,i,j;
	scanf("%d %d",&r,&c);
	int **a;
	a = (int **)malloc((r+1) * sizeof(int *));
	for(i=0;i<=r;i++){
		a[i] = (int *)malloc((c+1)*sizeof(int));
	}
	for(i=0;i<=r;i++){
		for(j=0;j<=c;j++){
			a[i][j] = 0;
		}
	}
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			scanf("%d "&a[i][j]);
		}
	}
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			a[i][c+1] += a[i][j];
			a[r+1][j] += a[i][j];
			a[r+1][c+1] += a[i][j];
		}
	}
	for(i=0;i<=r;i++){
		for(j=0;j<=c;j++){
			if (j =! c)printf("%d ",a[i][j]);
			else printf("%d\n",a[i][j]);
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:21: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
    6 |         a = (int **)malloc((r+1) * sizeof(int *));
      |                     ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | int main(void){
main.c:6:21: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
    6 |         a = (int **)malloc((r+1) * sizeof(int *));
      |                     ^~~~~~
main.c:6:21: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:17:36: error: invalid operands to binary & (have 'char *' and 'int')
   17 |                         scanf("%d "&a[i][j]);
      |                               ~~~~~^~~~~~~~
      |                               |         |
      |                               char *    int
Language: C

#include<stdio.h>
#inxlude<stdlib.h>


int main(){
  int i,j,k,r,c,sum;
  int **hyou;
  scanf("%d%d",&r,&c);
  hyou=malloc(r*sizeof(int *));
  for(i=0;i<r;i++){
    hyou[i]=malloc(c*sizeof(int));}
  for(i=0;i<r;i++){
    for(j=0;j<c;j++){
      scanf("%d",&hyou[i][j]);}
    }
  for(i=0;i<r;i++){
    for(j=0;j<=c;j++){
      if(j=c){
        sum=0;
        for(k=0;k<c;k++){
          sum=sum+hyou[i][k];}
        printf("%d\n",sum);}
      else{
        printf("%d ",hyou[i][j]);}
      }
    }
  for(i=0;i<c;i++){
    for(j=0;j<r;j++){
      sum=0;
      sum=sum+hyou[j][i];}
    printf("%d "sum);}
  sum=0;
  for(i=0;i<r;i++){
    for(j=0;j<c;j++){
      sum=sum+hyou[i][j];}}
  printf("%d\n",sum);
  for(i=0;i<r;i++){
    free(hyou[i]);}
  free(hyou);
  return 0;}

Compiler output:
main.c:2:2: error: invalid preprocessing directive #inxlude; did you mean #include?
    2 | #inxlude<stdlib.h>
      |  ^~~~~~~
      |  include
main.c: In function 'main':
main.c:9:8: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
    9 |   hyou=malloc(r*sizeof(int *));
      |        ^~~~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'malloc'
    1 | #include<stdio.h>
  +++ |+#include <stdlib.h>
    2 | #inxlude<stdlib.h>
main.c:9:8: warning: incompatible implicit declaration of built-in function 'malloc' [-Wbuiltin-declaration-mismatch]
    9 |   hyou=malloc(r*sizeof(int *));
      |        ^~~~~~
main.c:9:8: note: include '<stdlib.h>' or provide a declaration of 'malloc'
main.c:31:17: error: expected ')' before 'sum'
   31 |     printf("%d "sum);}
      |           ~     ^~~
      |                 )
main.c:38:5: error: implicit declaration of function 'free' [-Wimplicit-function-declaration]
   38 |     free(hyou[i]);}
      |     ^~~~
main.c:38:5: note: include '<stdlib.h>' or provide a declaration of 'free'
main.c:38:5: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch]
main.c:38:5: note: include '<stdlib.h>' or provide a declaration of 'free'
main.c:39:3: warning: incompatible implicit declaration of built-in function 'free' [-Wbuiltin-declaration-mismatch]
   39 |   free(hyou);
      |   ^~~~
main.c:39:3: note: include '<stdlib.h>' or provide a declaration of 'free'
Language: C

#include <stdio.h>

int main()
{
    int r, c, i, j;
    cells[101][101] = {0};

    scanf("%d %d\n", &r, &c);
    for(i = 0; i < r; i++)
    {
        for(j = 0; j < c; j++)
        {
            scanf("%d", &cells[i][j]);
            cells[r][j] += cells[i][j];
            cells[i][c] += cells[i][j];
            cells[r][c] += cells[i][j];
        }
        printf("\n");
    }

    for(i = 0; i <= r; i++)
    {
        for(j = 0; j <= c; j++)
        {
            printf("%d ", cells[i][j]);
        }
        printf("\n");
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: 'cells' undeclared (first use in this function)
    6 |     cells[101][101] = {0};
      |     ^~~~~
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:23: error: expected expression before '{' token
    6 |     cells[101][101] = {0};
      |                       ^
Language: C

#include <stdio.h>

int main()
{
    int r, c, i, j, n;
    cells[101][101] = {0};

    scanf("%d %d\n", &r, &c);
    for(i = 0; i < r; i++)
    {
        for(j = 0; j < c; j++)
        {
            scanf("%d", &cells[i][j]);
            n = cells[i][j];
            cells[r][j] += n;
            cells[i][c] += n;
            cells[r][c] += n;
        }
        printf("\n");
    }

    for(i = 0; i <= r; i++)
    {
        for(j = 0; j <= c; j++)
        {
            printf("%d ", cells[i][j]);
        }
        printf("\n");
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: 'cells' undeclared (first use in this function)
    6 |     cells[101][101] = {0};
      |     ^~~~~
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:23: error: expected expression before '{' token
    6 |     cells[101][101] = {0};
      |                       ^
Language: C

#include <stdio.h>

int main(void)
{
	int r,c;
	int i,j;
	int a[101][101]={0};
	int r_sum=0;
	int c_sum=0;
	int n_sum=0;

	scanf("%d %d", &r, &c);

		for(i=0;i<r;i++){	/*input???????´?*/
			for(j=0;j<c;j++){
				scanf("%d", &a[i][j]);
				n_sum += a[i][j];
				}
			}
		for(i=0;i<r;i++){		/*?¨??????????*/
				for(j=0;j<c;j++){
					r_sum += a[i][j];
					printf("%d", a[i][j]);
				}
				printf("%d\n", r_sum);
					r_sum = 0;
				}
		}
		for(i=0;i<r;i++){		/*????????????*/
				for(j=0;j<c;j++){
					c_sum += a[i][j];
				}
				printf("%d", c_sum);
				c_sum = 0;
				}
				printf("%d\n", n_sum);

	return 0;
}

Compiler output:
main.c:29:17: error: expected identifier or '(' before 'for'
   29 |                 for(i=0;i<r;i++){               /*????????????*/
      |                 ^~~
main.c:29:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   29 |                 for(i=0;i<r;i++){               /*????????????*/
      |                          ^
main.c:29:30: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   29 |                 for(i=0;i<r;i++){               /*????????????*/
      |                              ^~
main.c:36:40: error: expected declaration specifiers or '...' before string constant
   36 |                                 printf("%d\n", n_sum);
      |                                        ^~~~~~
main.c:36:48: error: unknown type name 'n_sum'
   36 |                                 printf("%d\n", n_sum);
      |                                                ^~~~~
main.c:38:9: error: expected identifier or '(' before 'return'
   38 |         return 0;
      |         ^~~~~~
main.c:39:1: error: expected identifier or '(' before '}' token
   39 | }
      | ^
Language: C

#include<stdio.h>




int main(void)
 {

 int r,c,i,j,rsam,last = 0;
  
  scanf("%d",&r);
  scanf("%d",&c);
  r++;
  c++;
  int num[r][c],csam[c];
  
  for(i = 0;i < r;i++){
   csam[i] = 0;
  }
  
  for(i=0;i<r ;i++){
   for(j=0;j<c-1;j++){
    
   
    
    if(i == r-1){
     if(j == c-2){
      printf(" %d",csam[j]);
      last += csam[j];
      printf(" %d\n",last);
      rsam = -1;
     }
     else{
      printf(" %d",csam[j]);
      last += csam[j];
     }
    }
    else if(i != r-1){
    
     scanf("%d",&num[i][j]);
     printf(" %d",num[i][j]);
      rsam += num[i][j];
      csam[j] += num[i][j];
   
      
    }
   }
   num[i][j] = 0;
   if(rsam != -1){
    printf(" %d",rsam);
   }  
   rsam = 0;
   printf("\n");
   
  }

Compiler output:
main.c: In function 'main':
main.c:55:3: error: expected declaration or statement at end of input
   55 |   }
      |   ^
Language: C

#include <stdio.h>
??
int main(void) {
????????int r,c;
????????int i,j;
????????int a[101][101];
????????int r_sum=0;
????????int c_sum=0;
????????int n_sum=0;
??
????????scanf("%d %d", &r, &c);
??
????????????????for(i=0;i<r;i++){?????? /**/
????????????????????????for(j=0;j<c;j++){
????????????????????????????????scanf("%d", &a[i][j]);
????????????????????????????????n_sum += a[i][j];
????????????????????????????????}
????????????????????????}

????????????????for(i=0;i<r;i++){?????????????? /**/
????????????????????????for(j=0;j<c;j++){
????????????????????????????????????????r_sum += a[i][j];
????????????????????????????????????????printf("%-2d", a[i][j]);
????????????????????????????????}
????????????????????????????????printf("%-2d\n", r_sum);
????????????????????????????????r_sum = 0;
????????????????????????}
??
????????????????for(i=0;i<c;i++){?????????????? /**/
????????????????????????for(j=0;j<r;j++){
????????????????????????????????c_sum += a[j][i];
????????????????????????????????}
????????????????????????????????printf("%-2d", c_sum);
????????????????????????????????c_sum = 0;
????????????????????????}
????????????????????????printf(" %d\n", n_sum);

????????return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
Language: C

int main(void)
 {
	int r=0, c=0;
	int i,j;
	int a[101][101];
	int rsum=0;
	int csum=0;
	int nsum=0;

	scanf("%d %d", &r, &c);
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
		scanf("%d",&a[i][j]);
		nsum += a[i][j];
		}
	}

	for(i=0;i<r;i++){
		for(j=;j<c;j++){
		rsum += a[i][j];
		printf("%-2d",a[i][j]);
		}
		printf("%d\n",rsum);
		rsum=0;
		}

	for(i=0;i<c;i++){
		for(j=0;j<r;j++){
			csum += a[j][i];
			}
		printf("%d ",csum);
		csum=0;
		}
		printf("%d\n",nsum);

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   10 |         scanf("%d %d", &r, &c);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void)
main.c:10:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   10 |         scanf("%d %d", &r, &c);
      |         ^~~~~
main.c:10:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:19:23: error: expected expression before ';' token
   19 |                 for(j=;j<c;j++){
      |                       ^
main.c:21:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   21 |                 printf("%-2d",a[i][j]);
      |                 ^~~~~~
main.c:21:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:21:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   23 |                 printf("%d\n",rsum);
      |                 ^~~~~~
main.c:23:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:31:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   31 |                 printf("%d ",csum);
      |                 ^~~~~~
main.c:31:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:34:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   34 |                 printf("%d\n",nsum);
      |                 ^~~~~~
main.c:34:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>
??
int main(void)
 {
	int r=0, c=0;
	int i,j;
	int a[101][101];
	int rsum=0;
	int csum=0;
	int nsum=0;

	scanf("%d %d", &r, &c);
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
		scanf("%d",&a[i][j]);
		nsum += a[i][j];
		}
	}

	for(i=0;i<r;i++){
		for(j=;j<c;j++){
		rsum += a[i][j];
		printf("%-2d",a[i][j]);
		}
		printf("%d\n",rsum);
		rsum=0;
		}

	for(i=0;i<c;i++){
		for(j=0;j<r;j++){
		csum += a[j][i];
		}
		printf("%d ",csum);
		csum=0;
		}
		printf("%d\n",nsum);

	return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
Language: C

#include<stdio.h>
int main(void){
int r,c,i,j;
int sheet[101][101];
scanf("%d %d\n",&r ,&c);
for(i=0;i <= r;i++){
for(j=0;j <= c;j++){
sheet[i][j]=0;
}
}
for(i=0;i < r;i++){
for(j=0;j < c;j++){
if (j == c-1){
scanf("%d\n",&sheet[i][j]);
}else{
scanf("%d ",&sheet[i][j]);
}
}
}
for(i=0;i < r;i++){
for(j=0;j < c;j++){
sheet[i][c] += sheet[i][j];
}
}
for(j=0;j < c;j++){
for(i=0;i < r;i++){
sheet[r][j] += sheet[i][j];
}
}
for(i=0;i < r;i++){
for(j=0;j < c;j++){
sheet[r][c] += sheet[i][j];
}
for(i=0;i <= r;i++){
for(j=0;j <= c;j++){
if (j == c){
printf("%d\n",sheet[i][j]);
}else{
printf("%d ",sheet[i][j]);
}
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:44:1: error: expected declaration or statement at end of input
   44 | }
      | ^
Language: C

#include<stdio.h>

main(){
	
	int r, c, i, j, a[101][101]={0};
	
	
	scanf("%d%d",&r,&c);
	
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			scanf("%d",&a[i][j]);
		}
	}
	
	for(i=0;i<r+1;i++){
		for(j=0;j<c;j++){
			a[i][c]+=a[i][j];
		}
	}
	for(i=0;i<r;i++){
		for(j=0;j<c+1;j++){
			a[r][j]+=a[i][j];
		}
	}
	
	for(i=0;i<r+1;i++){
		for(j=0;j<c+;j++){
			printf("%d ",a[i][j]);
		}
		printf("%d\n",a[i][c]);
	}
	
	return 0;
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:28:29: error: expected expression before ';' token
   28 |                 for(j=0;j<c+;j++){
      |                             ^
Language: C

#include<stdio.h>
int main(void)
{
	int sheet[101][101];
	int r,c;
	int i,j,k,temp = 0;
	scanf("%d %d",&r,&c);
	for(i = 0;i <= r;i++){
		for(j = 0;j <= c;j++){
			scanf("%d",sheet[i][j]);
		}
	}
	for(i = 0;i <= r;i++){
		for(j = 0;j <= c;j++){
			printf("%d ",sheet[i][j]);
			temp += sheet[i][j];
		}
		printf("%d\n",temp);
		temp = 0;
	}
	for(i = 0;i <= c;i++){
		for(j = 0;j <= r;j++){
			temp += sheet[j][i]
		}
		printf("%d ",temp);
		temp = 0;
	}
	printf("\n");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:23:44: error: expected ';' before '}' token
   23 |                         temp += sheet[j][i]
      |                                            ^
      |                                            ;
   24 |                 }
      |                 ~
Language: C

\#include<stdio.h>
int main(void)
{
	int sheet[101][101];
	int r,c;
	int i,j,k,temp = 0;
	scanf("%d %d",&r,&c);
	for(i = 0;i <= r;i++){
		for(j = 0;j <= c;j++){
			scanf("%d",&sheet[i][j]);
		}
	}
	for(i = 0;i <= r;i++){
		for(j = 0;j <= c;j++){
			printf("%d ",sheet[i][j]);
			temp += sheet[i][j];
		}
		printf("%d\n",temp);
		temp = 0;
	}
	for(i = 0;i <= c;i++){
		for(j = 0;j <= r;j++){
			temp += sheet[j][i];
		}
		printf("%d ",temp);
		temp = 0;
	}
	printf("\n");
	return 0;
}

Compiler output:
main.c:1:1: error: stray '\' in program
    1 | \#include<stdio.h>
      | ^
main.c:1:2: error: stray '#' in program
    1 | \#include<stdio.h>
      |  ^
main.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | \#include<stdio.h>
      |          ^
Language: C

#include<stdio.h>
int main(void){
	int r,c;
	int i,j;
	int a[100][100]={0};
	
	scanf("%d %d",&r,&c);
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			scanf("%d",&a[i][j]);
			a[r][j]+=a[i][j];
			a[i][c]+=a[i][j];
		}
	}
	for(i=0;i<r+1;i++){
		for(j=0;j<c+1;j++){
			printf("%d "a[i][j]);
		}
		printf("\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:37: error: expected ')' before 'a'
   17 |                         printf("%d "a[i][j]);
      |                               ~     ^
      |                                     )
Language: C

#include<stdio.h>
int main(void){
	int r,c,i,j,a[100][100],b=0;
	scanf("%d %d",&r,&c);
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			scanf("%d",&a[i][j]);
			a[i][c+1]+=a[i][j];
			a[r+1][j]+=a[i][j];
			b+=a[i][j]
		}
	}
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			printf("%d ",a[i][j]);
		}
		printf("%d ",a[i][j+1]);
		printf("\n");
	}
	for(j=0;j<c;j++){
		printf("%d ",a[r+1][j]);
	}
	printf("%d ",b);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:35: error: expected ';' before '}' token
   10 |                         b+=a[i][j]
      |                                   ^
      |                                   ;
   11 |                 }
      |                 ~