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

#include<iostream>
using namespace std;
int main(){
    int r,c;
    int rs[101]={};
    int cs={}
    cin>>r>>c;
    int h[101][101];
    for(int i =0;i<=r;i++){
        for(int j =0;j<c;j++){
            cin>>h[i][j];
        }
    }
    for(int j=0;j<=c;j++){
        if(i!=r){
            if(j!=c)cs += h[i][j];
            if(j != c)rs[j] += h[i][j];
            if(j == c)cout<<cs<<endl;
            else cout << h[i][j] << " ";
        }
        else{
            if(j != c)cs += rs[j];
            if(j == c)cout <<cs<<endl;
            else cout<<rs[j]<<" ";
        }
    }
    return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: expected ',' or ';' before 'cin'
    7 |     cin>>r>>c;
      |     ^~~
a.cc:15:12: error: 'i' was not declared in this scope
   15 |         if(i!=r){
      |            ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int i,j,k,r,c,b;
  cin >> r >> c;
  int Ur[100]={}
  int Uc[100]={}
  int U=0;
  for(i=0;i<r;i++){
    cin >> b;
    cout << b;
    Ur[i]+=b;
    Uc[0]+=b; 
    for(j=1;j<c;j++){
      cin >> b;
      cout <<" " << b;
      Ur[i]+=b;
      Uc[j]+=b; 
    }
    cout << Ur[i] << endl;
    sum+=Ur[i];
  }
  cout << Uc[0];
  for(j=1;j<c;j++){
    cout << " " << Uc[j];    
  }
  cout << " " << U <<  endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'int'
    7 |   int Uc[100]={}
      |   ^~~
a.cc:13:5: error: 'Uc' was not declared in this scope; did you mean 'U'?
   13 |     Uc[0]+=b;
      |     ^~
      |     U
a.cc:21:5: error: 'sum' was not declared in this scope
   21 |     sum+=Ur[i];
      |     ^~~
a.cc:23:11: error: 'Uc' was not declared in this scope; did you mean 'U'?
   23 |   cout << Uc[0];
      |           ^~
      |           U
Language: C++

#include<iostream>
using namespace std;
int main(){
  int i,j,k,r,c,b;
  cin >> r >> c;
  int Ur[100]={}
  int Uc[100]={};
  int U=0;
  for(i=0;i<r;i++){
    cin >> b;
    cout << b;
    Ur[i]+=b;
    Uc[0]+=b; 
    for(j=1;j<c;j++){
      cin >> b;
      cout <<" " << b;
      Ur[i]+=b;
      Uc[j]+=b; 
    }
    cout << Ur[i] << endl;
    sum+=Ur[i];
  }
  cout << Uc[0];
  for(j=1;j<c;j++){
    cout << " " << Uc[j];    
  }
  cout << " " << U <<  endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'int'
    7 |   int Uc[100]={};
      |   ^~~
a.cc:13:5: error: 'Uc' was not declared in this scope; did you mean 'U'?
   13 |     Uc[0]+=b;
      |     ^~
      |     U
a.cc:21:5: error: 'sum' was not declared in this scope
   21 |     sum+=Ur[i];
      |     ^~~
a.cc:23:11: error: 'Uc' was not declared in this scope; did you mean 'U'?
   23 |   cout << Uc[0];
      |           ^~
      |           U
Language: C++

#include<iostream>
using namespace std;
int main(){
  int i,j,k,r,c,b;
  cin >> r >> c;
  int Ur[100]={};
  int Uc[100]={};
  int U=0;
  for(i=0;i<r;i++){
    cin >> b;
    cout << b;
    Ur[i]+=b;
    Uc[0]+=b; 
    for(j=1;j<c;j++){
      cin >> b;
      cout <<" " << b;
      Ur[i]+=b;
      Uc[j]+=b; 
    }
    cout << Ur[i] << endl;
    sum+=Ur[i];
  }
  cout << Uc[0];
  for(j=1;j<c;j++){
    cout << " " << Uc[j];    
  }
  cout << " " << U <<  endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'sum' was not declared in this scope
   21 |     sum+=Ur[i];
      |     ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
  int i,j,k,r,c,b;
  cin >> r >> c;
  int Ur[100]={};
  int Uc[100]={};
  int U=0;
  for(i=0;i<r;i++){
    cin >> b;
    cout << b;
    Ur[i]+=b;
    Uc[0]+=b; 
    for(j=1;j<c;j++){
      cin >> b;
      cout <<" " << b;
      Ur[i]+=b;
      Uc[j]+=b; 
    }
    cout << " " <<Ur[i] << endl;
    sum+=Ur[i];
  }
  cout << Uc[0];
  for(j=1;j<c;j++){
    cout << " " << Uc[j];    
  }
  cout << " " << U <<  endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:5: error: 'sum' was not declared in this scope
   21 |     sum+=Ur[i];
      |     ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int r,c,i;
    cin>>r>>c;
    int a[r][c];
    for (int x=0;x<r;x++){
        for(int y=0;y<c;y++){
            cin>>a[x][y];
        }
    }
    for(int x=0;x<r+1;x++){
        if(x==r){
            for(int z=0;z<r;z++){
                i+=a[x];
                cout<<i<<" ";
                i=0;
            }
        }
        else for(int y=0;y<c+1;y++){
            if(y==c){
                cout << i << endl;
            }
            else {
                i+=a[x][y];
                cout<<a[x][y]<<" ";
                i==0;
            }
        }
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   15 |                 i+=a[x];
      |                 ~^~~~~~
      |                  |
      |                  int*
Language: C++

#include <iostream>
#include <string>
#include <numeric>
using namespace std;

int main(void){
  int r,c,a,b;
  int hyo [101][101];
  cin >> r >> c;
  for (a = 0; a < r; a++){
    for (b = 0; b < c; b++){
      cin >> hyo[a][b];
    }
  }
  for (a = 0; a < r; a++){
    hyo[a][c] = accumulate(hyo[a][0],hyo[a][c - 1],0);
  }
  for (b = 0; b < c; b++){
    hyo[r][b] = accumulate(hyo[0][b],hyo[r - 1][b],0);
  }
  hyo[r][c] = accumulate(hyo[r][0],hyo[r][c - 1],0);

  for (a = 0; a <= r; a++){
    for (b = 0; b <= c; b++){
      cout << hyo[a][b] << " ";
    }
    cout << endl;
  }
}



Compiler output:
In file included from /usr/include/c++/14/numeric:62,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_numeric.h: In instantiation of '_Tp std::accumulate(_InputIterator, _InputIterator, _Tp) [with _InputIterator = int; _Tp = int]':
a.cc:16:27:   required from here
   16 |     hyo[a][c] = accumulate(hyo[a][0],hyo[a][c - 1],0);
      |                 ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_numeric.h:141:48: error: invalid type argument of unary '*' (have 'int')
  141 |         __init = _GLIBCXX_MOVE_IF_20(__init) + *__first;
      |                                                ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a[100][100],r,c,sum=0;
  scanf("%d %d",&r,&c);
  for(int i=0;i<r;i++){
    for(int j=0;j<c;j++){
      cin >> a[i][j];
      a[i][c]+=a[i][j];
      a[r][j]+=a[i][j];
    }
    a[r][c]+=a[i][c];
  }
  for(int i=0;i<=r;i++){
    for(int j=0;j<=c;j++){
      cout<< a[i][j]
      if(j==c) cout << endl;
      else cout << " ";
    }
    cout << endl;
  }
  return 0;
  }



Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: expected ';' before 'if'
   16 |       cout<< a[i][j]
      |                     ^
      |                     ;
   17 |       if(j==c) cout << endl;
      |       ~~             
a.cc:18:7: error: 'else' without a previous 'if'
   18 |       else cout << " ";
      |       ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a[100][100],r,c,sum=0;
  scanf("%d %d",&r,&c);
  for(int i=0;i<r;i++){
    for(int j=0;j<c;j++){
      cin >> a[i][j];
      a[i][c]+=a[i][j];
      a[r][j]+=a[i][j];
    }
    a[r][c]+=a[i][c];
  }
  for(int i=0;i<=r;i++){
    for(int j=0;j<=c;j++){
      cout<< a[i][j]
      if(j==c){ cout << endl;}
      else{ cout << " ";}
    }
    cout << endl;
  }
  return 0;
  }



Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: expected ';' before 'if'
   16 |       cout<< a[i][j]
      |                     ^
      |                     ;
   17 |       if(j==c){ cout << endl;}
      |       ~~             
a.cc:18:7: error: 'else' without a previous 'if'
   18 |       else{ cout << " ";}
      |       ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int a[100][100],r,c,sum=0;
  scanf("%d %d",&r,&c);
  for(int i=0;i<r;i++){
    for(int j=0;j<c;j++){
      cin >> a[i][j];
      a[i][c]+=a[i][j];
      a[r][j]+=a[i][j];
    }
    a[r][c]+=a[i][c];
  }
  for(int i=0;i<=r;i++){
    for(int j=0;j<=c;j++){
      cout<< a[i][j]
      if(j==c){ cout << endl;}
      else{ cout << ' ';}
    }
    cout << endl;
  }
  return 0;
  }



Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: expected ';' before 'if'
   16 |       cout<< a[i][j]
      |                     ^
      |                     ;
   17 |       if(j==c){ cout << endl;}
      |       ~~             
a.cc:18:7: error: 'else' without a previous 'if'
   18 |       else{ cout << ' ';}
      |       ^~~~
Language: C++

#include<iostream>

using namespace std;

int main() {
    int r, c, i, j;
    int table[100][100]={0};
    for (i = 0; i< r; i++){
        for (j = 0; j < c; j++) {
            cin >> table[i][j];
            table[i][c] += table[i][j];
            table[r][j] += table[i][j];  
            table[r][c] += table[i][j];
        }
    }
    for (i = 0; i<= r; i++){
        for (j = 0; j <= c; j++)
            cout << table[i][j];
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int r , c;
	int arr[101][101]={0,0};
	cin >> r >> c;
	for(int i=0 ; i<r ; i++){
		for(int j=0 ; j<c ; j++){
			cin >> arr[j][i];
		}
	}
	for(int i=0 ; i<r ; i++){
		for(int j=0 ; j<c ; j++){
			arr[c][i]+=arr[j][i];
		}
	}
	for(int i=0 ; i<c ; i++){
		for(int j=0 ; j<r ; j++){
			arr[i][r]+=arr[i][j];
		}
	}
	for(int i=0 ; i<c ; i++){
		arr[c][r]+=arr[i][r];
	}
	for(int i=0 ; i<=r ; i++){
		for(int j=0 ; j<=c ; j++){
			cout << arr[j][i] << " " ;
		}
		if(i!=r) cout << endl;
	}
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:32:18: error: expected '}' at end of input
   32 |         return 0;
      |                  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
   int r, c, i, j, sum, edge, sq[102][102];
   cin >> r >> c;
   for ( i = 0; i < r; i++)
   {
      for( j = 0; j < c; j++)
      {
         cin >> sq[i][j];
      }
   }
   for( i = 0; i < r; i++)
   {   
      for( j = 0; j < c; j++)
      {
         sum = sum + sq[i][j];
         sq[i][c + 1] = sum;
          ege = edge + sum;
      }
      sum = 0;
   }
   for( i = 0; i < c; i++)
   {
      for( j = 0; j < r; r++)
      {
         sum = sum + sq[j][i];
         sq[r + 1][i] = sum;
         edge = edge + sum;
      }
      sum = 0;
   }
   sq[r + 1][c + 1] = edge;
   for( i = 0; i < r + 1; i++)
   {
      for( j = 0; j < c + 1; j++)
      {
         cout << sq[i][j];
      }
      cout << endl;
   }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:11: error: 'ege' was not declared in this scope; did you mean 'edge'?
   20 |           ege = edge + sum;
      |           ^~~
      |           edge
Language: C++

#include <iostream>

using namespace std;

int main(){
  
  int r, c;

  cin >> r >> c;

  int sheet[r+1][c+1];
  
  memset(sheet, 0, sizeof sheet);

  for(int i = 0; i < r; i++){
    for(int j = 0; j < c; j++){
      cin >> sheet[i][j];
    }
  }

  for(int i = 0; i < r+1; i++){
    for(int j = 0; j < c+1; j++){
      cout << sheet[i][j];
      if(j < c){
	cout << " ";
      }else{
	cout << endl;
      }
      if(i < r){
	sheet[r][j] += sheet[i][j];
	sheet[i][c] += sheet[i][j];
      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'memset' was not declared in this scope
   13 |   memset(sheet, 0, sizeof sheet);
      |   ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
  
  int r, c;

  cin >> r >> c;

  int sheet[r+1][c+1];
  
  memset(sheet, 0, sizeof sheet);

  for(int i = 0; i < r; i++){
    for(int j = 0; j < c; j++){
      cin >> sheet[i][j];
    }
  }

  for(int i = 0; i < r+1; i++){
    for(int j = 0; j < c+1; j++){
      cout << sheet[i][j];
      if(j < c){
	cout << " ";
      }else{
	cout << endl;
      }
      if(i < r){
	sheet[r][j] += sheet[i][j];
	sheet[i][c] += sheet[i][j];
      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'memset' was not declared in this scope
   14 |   memset(sheet, 0, sizeof sheet);
      |   ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

(r, c) = [int(i) for i in input().split()]
src = []
for _ in range(r):
    row = [int(i) for i in input().split()]
    row.append(sum(row))
    src.append(row)
last_row = [0 for _ in range(c + 1)]
for rc in range(r):
    for cc in range(c+1):
        last_row[cc] += src[rc][cc]
src.append(last_row)

for rc in range(r+1):
    print(' '.join([str(a) for a in src[rc]]))

Compiler output:
a.cc:1:3: error: expected ')' before ',' token
    1 | (r, c) = [int(i) for i in input().split()]
      | ~ ^
      |   )
a.cc:1:6: error: expected constructor, destructor, or type conversion before ')' token
    1 | (r, c) = [int(i) for i in input().split()]
      |      ^
Language: C++

#incldue<iostream>
using namespace std;
int r,c,y[101][101],t[101]={0},k[101]={0},sum=0;
int in(){
cin>>r>>c;
for(int a=0;a<r;a++){
for(int b=0;b<0;b++){
cin>>y[a][b];
k[r]+=y[a][b];
t[b]+=y[a][b];
sum+=y[a][b];
}
}
for(int a=0;a<=r;a++){
for(int b=0;b<=c;b++){
if(a==r)
y[a][b]=t[b];
if(b==c)
y[a][b]==k[a];
if(a==r&&b==c)
y[a][b]=sum;
cout<<y[a][b];
if(b<c)
cout<<" ";
else
cout<<endl;
}
}
}

int main(){
in();
return 0;

}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue<iostream>
      |  ^~~~~~~
      |  include
a.cc: In function 'int in()':
a.cc:5:1: error: 'cin' was not declared in this scope
    5 | cin>>r>>c;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incldue<iostream>
a.cc:22:1: error: 'cout' was not declared in this scope
   22 | cout<<y[a][b];
      | ^~~~
a.cc:22:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:26:7: error: 'endl' was not declared in this scope
   26 | cout<<endl;
      |       ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incldue<iostream>
a.cc:29:1: warning: no return statement in function returning non-void [-Wreturn-type]
   29 | }
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
 int r,c,sum1 = 0,sum2 = 0;
 int array[101][101];

 cin >> r >> c;

 for(int i = 1; i <= r; i++ ){
  sum1 = 0;

  for(int j = 1; j <= c; j++){
   cin >> array[i][j];
   sum1 += array[i][j]; 
  }
  array[i][c+1] = sum1; 
 }

 for(int i = 1; i <= c; i++){
  sum2 = 0;

  for(int j = 1; j <= r; j++){
   sum2 += array[j][i];
  }
  array[r+1][j] = sum2;
 }

 for(int i = 1; i <= c+1; i++){
  for(int j = 1; j <= r+1; j++){
   cout << array[i][j];
  }
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:14: error: 'j' was not declared in this scope
   26 |   array[r+1][j] = sum2;
      |              ^
Language: C++

// ConsoleApplication4.cpp : コンソール アプリケーションのエントリ ポイントを定義します。
//

#include "stdafx.h"



#include<iostream>
using namespace std;

int main()
{
	int n[100][100];
	int r = 0;
	int c = 0;
	int sumRow = 0;
	int sumCow = 0;
	int sumTotal = 0;

	cin >> r >> c;

	for (int i = 0; i < r; i++)
	{
		for (int j = 0; j < c; j++)
		{
			cin >> n[i][j];
		}
	}

	for (int i = 0; i < r; i++)
	{
		for (int j = 0; j < c; j++)
		{
			sumRow += n[i][j];
		}
		n[i][c] = sumRow;
		sumTotal += sumRow;
		sumRow = 0;
	}

	for (int i = 0; i < r; i++)
	{
		for (int j = 0; j < c; j++)
		{
			sumCow += n[j][i];
		}
		n[r][i] = sumCow;
		sumCow = 0;
	}

	n[r][c] = sumTotal;

	for (int i = 0; i <= r; i++)
	{
		for (int j = 0; j <= c; j++)
		{
			cout << n[i][j] << " ";
		}
		cout << endl;
	}

	return 0;
}

Compiler output:
a.cc:4:10: fatal error: stdafx.h: No such file or directory
    4 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <vector>
using namespace std;

int main(){
	long r, c;
	cin >> r >> c;
	vector< vector<long> > sp(r);
	for (long i = 0; i < r; i++){
		sp[i].resize(c);
	}
	vector<long> rsum(r, 0);
	vector<long> csum(c, 0);
	for (long i = 0; i < r; i++){
		for (long j = 0; j < c; j++){
			rsum[i] += sp[i][j];
		}
	}
	for (long i = 0; i < c; i++){
		for (long j = 0; j < r; j++){
			csum[i] += sp[j][i];
		}
	}
	long sum = 0;
	for (long i = 0; i < r; i++){
		sum += rsum[i];
	}
	for (long i = 0; i < r; i++){
		for (long j = 0; j < c; j++){
			cout << sp[i][j] << " ";
		}
		cout << rsum[i] << endl;
	}
	for (long i = 0; i < c; i++){
		cout << csum[i] << " "
	}
	cout << sum << endl;
	/*
	vector< vector<long> > newsp(r + 1);
	for (long i = 0; i < r + 1; i++){
		newsp[i].resize(c + 1);
	}
	for (long i = 0; i < r + 1; i++){
		for (long j = 0; j < c + 1; j++){
			if (i < r && j < c) newsp[i][j] = sp[i][j];
			else if (i = r && j < c) newsp[i][j] = csum[j];
			else if (j = c && i < r) newsp[i][j] = rsum[i];
			else newsp[i][j] = sum;
		}
	}
	for (long i = 0; i < r + 1; i++){
		for (long j = 0; j < c + 1; j++){
			cout << newsp[i][j];
		}
		cout << endl;
	}
	*/
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:39: error: expected ';' before '}' token
   35 |                 cout << csum[i] << " "
      |                                       ^
      |                                       ;
   36 |         }
      |         ~
Language: C++

#include <iostream>
using namespace std;

int main() {
    int r, c, i, j, z;
    cin >> r >> c;
    int poi[r + 1][c + 1];
    
    for(i = 0; i < r; i++){
    	for(j = 0; j < c; j++){
    		cin >> poi[i][j];
    	}
    }
    
    for(i = 0; i < r; i++){
    	z = 0;
  	   for(j = 0; j < c; j++){
    	  z += poi[i][j];
    	  
       }
       
       poi[i][c] = z;
    }
    
    for(i = 0; i < c + 1; i++){
       z = 0;	
       for(j = 0; j < r; j++){
    		z += poi[j][i];
    	}
    	poi[r][i] = z;
    }
    
    for(i = 0; i < r + 1; i++){
    	for(j = 0; j < c + 1; j++){
    		cout << poi[i][j];
    		if(j != c)
    		  cout << " ";
    	}
    	cout << endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:40:6: error: expected '}' at end of input
   40 |     }
      |      ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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
?¶???????????????????????????????????????????????????? . . .

Compiler output:
a.cc:11:2: error: extended character ¶ is not valid in an identifier
   11 | ?¶???????????????????????????????????????????????????? . . .
      |  ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 4 5
      | ^
Language: C++


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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'scanf' was not declared in this scope
    6 |         scanf("%d %d", &r, &c);
      |         ^~~~~
a.cc:33:25: error: 'printf' was not declared in this scope
   33 |                         printf("%d", a[i][j]);
      |                         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | 
a.cc:36:17: error: 'printf' was not declared in this scope
   36 |                 printf("\n");
      |                 ^~~~~~
a.cc:36:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<iostream>

int main()
{
	int r, c;
	int ans[101][10 = { 0 };
	std::cin >> r >> c;

	for (int i = 0; i < r; i++) {
		for (int j = 0; j < c; j++) {
			std::cin >> ans[i][j];
			int point = ans[i][j];
			ans[i][c] += point;
			ans[r][j] += point;
			ans[r][c] += point;
		}
	}

	std::cout << std::endl;

	for (int i = 0; i <= r; i++) {
		for (int j = 0; j <- c; j++) {
			std::cout << ans[i][j];
			if (j != c)
				std::cout << " ";
		}
		std::cout << std::endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:22: error: lvalue required as left operand of assignment
    6 |         int ans[101][10 = { 0 };
      |                      ^~
a.cc:6:32: error: expected ']' before ';' token
    6 |         int ans[101][10 = { 0 };
      |                                ^
      |                                ]
a.cc:11:37: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |                         std::cin >> ans[i][j];
      |                                     ^~~
      |                                     abs
a.cc:23:38: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |                         std::cout << ans[i][j];
      |                                      ^~~
      |                                      abs
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;
int main(void){
    // Here your code !
  int r,c,n,i,j;
  int table[101][101];

  cin>>r>>c;
  for( i=0;i<r;i++){
      for( j=0;j<c;j++){
      cin>>table[i][j];
      }}
      
      for( i=0;i<r;i++){
          n=0;
      for( j=0;j<c;j++){
      n=n+table[i][j];
      }
          table[i][c]=n;
      }
      
      for( i=0;i<c;i++){
          n=0;
      for( j=0;j<r;j++){
      n=n+table[j][i];
      }
          table[r][i]=n;
      }
      
      for( i=0;i<r;i++){
     table[r][c]=table[r][c]+table[i][c];
      }
 for( i=0;i<=r;i++){
      for( j=0;j<=c;j++){
      cout<<table[i][j];
      if(j!=c) {cout<<" ";}
      }
         cout<<endl;
      }

Compiler output:
a.cc: In function 'int main()':
a.cc:42:8: error: expected '}' at end of input
   42 |       }
      |        ^
a.cc:6:15: note: to match this '{'
    6 | int main(void){
      |               ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int r,c;
    int mt[101][101]=[0][0];
    
    cin >> r >> c;
    
    for(int i = 0;i<c;i++){
        for(int j = 0;j<r;j++){
            cin >> mt[i][j];
        }
    }
    
    for(int i =0;i<c;i++){
        for(int j=0;j<r;j++){
            mt[i][c] += mt[i][j];
            mt[r][j] += mt[i][j];
            cout << mt[i][j] << " ";
            if(j==c-1)cout << mt[i][c];
        }
        cout << endl;
    }
    for(int i=0;i<c;i++){
        mt[r][c] += mt[r][i];
        cout << mt[r][i] << " ";
    } 
    cout << mt[r][c] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: expected identifier before numeric constant
    6 |     int mt[101][101]=[0][0];
      |                       ^
a.cc: In lambda function:
a.cc:6:25: error: expected '{' before '[' token
    6 |     int mt[101][101]=[0][0];
      |                         ^
a.cc: In function 'int main()':
a.cc:6:25: error: no match for 'operator[]' (operand types are 'main()::<lambda()>' and 'int')
Language: C++

#include<iostream>
using namespace std;

    int r,c;
    int mt[101][101]=[][];
int main(){

    
    cin >> r >> c;
    
    for(int i = 0;i<c;i++){
        for(int j = 0;j<r;j++){
            cin >> mt[i][j];
        }
    }
    
    for(int i =0;i<c;i++){
        for(int j=0;j<r;j++){
            mt[i][c] += mt[i][j];
            mt[r][j] += mt[i][j];
            cout << mt[i][j] << " ";
            if(j==c-1)cout << mt[i][c];
        }
        cout << endl;
    }
    for(int i=0;i<c;i++){
        mt[r][c] += mt[r][i];
        cout << mt[r][i] << " ";
    } 
    cout << mt[r][c] << endl;
}

Compiler output:
a.cc: In lambda function:
a.cc:5:24: error: expected '{' before '[' token
    5 |     int mt[101][101]=[][];
      |                        ^
a.cc: At global scope:
a.cc:5:25: error: expected primary-expression before ']' token
    5 |     int mt[101][101]=[][];
      |                         ^
Language: C++

#include<iostream>
using namespace std;

int main() {

  int r, c, i, j;
  int A[101][101];

  cin >> r >> c;

   for( i = 0; i < r; i++ ){
    for( j = 0; j < c; j++ ){
      cin >> A[i][j];
      A[i][c] += A[i][j];
      A[r][j] += A[i][j];
      A[r][c] += A[i][j]
    }
  }

  for( i = 0; i <= r; i++ ){
    for( j = 0; j <= c; j++ ){
      cout << A[i][j] << " ";
    }
    cout << endl;
  }
  
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: expected ';' before '}' token
   16 |       A[r][c] += A[i][j]
      |                         ^
      |                         ;
   17 |     }
      |     ~
Language: C++

#include <iostream>
using namespace std;

int main(void)
{

	int c,r;
	int i,j;
	int a[][];
	
	cin >> c >> r;
	
	for( i = 0; i <= r + 1; i++){
		for( j = 0; j <= c + 1; j++){
			a[i][j] = 0;
		}
	}
	
	for (i = 1; i <= r; i++){
		for(j =1; j<= c; j++){
			cin >> a[i][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 = 1; i <= r + 1; i++){
		for (j = 1; j <= c + 1; j++){
			if (j != 1) cout << " ";
			cout << a[i][j];
		}
		cout << endl;
	}
	
	return 0;
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: declaration of 'a' as multidimensional array must have bounds for all dimensions except the first
    9 |         int a[][];
      |             ^
a.cc:15:25: error: 'a' was not declared in this scope
   15 |                         a[i][j] = 0;
      |                         ^
a.cc:21:32: error: 'a' was not declared in this scope
   21 |                         cin >> a[i][j];
      |                                ^
a.cc:31:33: error: 'a' was not declared in this scope
   31 |                         cout << a[i][j];
      |                                 ^
Language: C++

#include <iostream>
using namespace std;

int main(void)
{

	int c,r;
	int i,j;
	int a[102][102];
	
	cin >> c >> r;
	/*
	for( i = 0; i <= r + 1; i++){
		for( j = 0; j <= c + 1; j++){
			a[i][j] = 0;
		}
	}
	
	for (i = 1; i <= r; i++){
		for(j =1; j<= c; j++){
			cin >> a[i][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 = 1; i <= r + 1; i++){
		for (j = 1; j <= c + 1; j++){
			if (j != 1) cout << " ";
			cout << a[i][j];
		}
		cout << endl;
	}
	
	return 0;
}
	





#include <iostream>
using namespace std;
 
int main(){
    int i, j, r, c;
    int array[102][102];
 
    cin >> r >> c;
 */
    for (i = 1; i <= r + 1; i++){
        for (j = 1; j <= c + 1; j++){
            array[i][j] = 0;
        }
    }
 
    for (i = 1; i <= r; i++){
        for (j = 1; j <= c; j++){
            cin >> array[i][j];
            array[i][c+1] += array[i][j];
            array[r+1][j] += array[i][j];
            array[r+1][c+1] += array[i][j];
        }
    }
 
    for (i = 1; i <= r + 1; i++){
        for (j = 1; j <= c + 1; j++){
            if (j != 1) cout << " ";
            cout << array[i][j];
        }
        cout << endl;
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:55:21: error: expected initializer before '[' token
   55 |             array[i][j] = 0;
      |                     ^
a.cc:55:21: error: expected ';' before '[' token
a.cc:61:25: error: missing template arguments before '[' token
   61 |             cin >> array[i][j];
      |                         ^
a.cc:62:21: error: expected initializer before '[' token
   62 |             array[i][c+1] += array[i][j];
      |                     ^
a.cc:62:21: error: expected ';' before '[' token
a.cc:63:20: error: expected ']' before '+' token
   63 |             array[r+1][j] += array[i][j];
      |                    ^
      |                    ]
a.cc:63:23: error: expected initializer before '[' token
   63 |             array[r+1][j] += array[i][j];
      |                       ^
a.cc:63:23: error: expected ';' before '[' token
a.cc:64:20: error: expected ']' before '+' token
   64 |             array[r+1][c+1] += array[i][j];
      |                    ^
      |                    ]
a.cc:64:23: error: expected initializer before '[' token
   64 |             array[r+1][c+1] += array[i][j];
      |                       ^
a.cc:71:26: error: missing template arguments before '[' token
   71 |             cout << array[i][j];
      |                          ^
Language: C++


#include <iostream>
using namespace std;
 
int main(){
    int i, j, r, c;
    int a[102][102];
 
    cin >> r >> c;
 */
    for (i = 1; i <= r + 1; i++){
        for (j = 1; j <= c + 1; j++){
            a[i][j] = 0;
        }
    }
 
    for (i = 1; i <= r; i++){
        for (j = 1; j <= c; j++){
            cin >> array[i][j];
            a[i][c+1] += array[i][j];
            a[r+1][j] += array[i][j];
            a[r+1][c+1] += array[i][j];
        }
    }
 
    for (i = 1; i <= r + 1; i++){
        for (j = 1; j <= c + 1; j++){
            if (j != 1) cout << " ";
            cout << a[i][j];
        }
        cout << endl;
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected primary-expression before '/' token
   10 |  */
      |   ^
a.cc:11:5: error: expected primary-expression before 'for'
   11 |     for (i = 1; i <= r + 1; i++){
      |     ^~~
a.cc:11:32: error: expected ';' before ')' token
   11 |     for (i = 1; i <= r + 1; i++){
      |                                ^
      |                                ;
a.cc:19:25: error: missing template arguments before '[' token
   19 |             cin >> array[i][j];
      |                         ^
a.cc:20:31: error: missing template arguments before '[' token
   20 |             a[i][c+1] += array[i][j];
      |                               ^
a.cc:21:31: error: missing template arguments before '[' token
   21 |             a[r+1][j] += array[i][j];
      |                               ^
a.cc:22:33: error: missing template arguments before '[' token
   22 |             a[r+1][c+1] += array[i][j];
      |                                 ^
Language: C++


#include <iostream>
using namespace std;
 
int main(){
    int i, j, r, c;
    int a[102][102];
 
    cin >> r >> c;

    for (i = 1; i <= r + 1; i++){
        for (j = 1; j <= c + 1; j++){
            a[i][j] = 0;
        }
    }
 
    for (i = 1; i <= r; i++){
        for (j = 1; j <= c; j++){
            cin >> array[i][j];
            a[i][c+1] += array[i][j];
            a[r+1][j] += array[i][j];
            a[r+1][c+1] += array[i][j];
        }
    }
 
    for (i = 1; i <= r + 1; i++){
        for (j = 1; j <= c + 1; j++){
            if (j != 1) cout << " ";
            cout << a[i][j];
        }
        cout << endl;
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: missing template arguments before '[' token
   19 |             cin >> array[i][j];
      |                         ^
a.cc:20:31: error: missing template arguments before '[' token
   20 |             a[i][c+1] += array[i][j];
      |                               ^
a.cc:21:31: error: missing template arguments before '[' token
   21 |             a[r+1][j] += array[i][j];
      |                               ^
a.cc:22:33: error: missing template arguments before '[' token
   22 |             a[r+1][c+1] += array[i][j];
      |                                 ^
Language: C++


#include <iostream>
using namespace std;
 
int main(){
    int i, j, r, c;
    int a[102][102];
 
    cin >> r >> c;

    for (i = 1; i <= r + 1; i++){
        for (j = 1; j <= c + 1; j++){
            a[i][j] = 0;
        }
    }
 
    for (i = 1; i <= r; i++){
        for (j = 1; j <= c; j++){
            cin >> array[i][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 = 1; i <= r + 1; i++){
        for (j = 1; j <= c + 1; j++){
            if (j != 1) cout << " ";
            cout << a[i][j];
        }
        cout << endl;
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:25: error: missing template arguments before '[' token
   19 |             cin >> array[i][j];
      |                         ^
Language: C++

#include <iostream>
using namespace std;

int main(void)
{

	int c,r;
	int i,j;
	int a[102][102];
	
	cin >> c >> r;

    for (i = 1; i <= r + 1; i++){
        for (j = 1; j <= c + 1; j++){
            array[i][j] = 0;
        }
    }
 
    for (i = 1; i <= r; i++){
        for (j = 1; j <= c; j++){
            cin >> array[i][j];
            array[i][c+1] += array[i][j];
            array[r+1][j] += array[i][j];
            array[r+1][c+1] += array[i][j];
        }
    }
 
    for (i = 1; i <= r + 1; i++){
        for (j = 1; j <= c + 1; j++){
            if (j != 1) cout << " ";
            cout << array[i][j];
        }
        cout << endl;
    }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: expected initializer before '[' token
   15 |             array[i][j] = 0;
      |                     ^
a.cc:15:21: error: expected ';' before '[' token
a.cc:21:25: error: missing template arguments before '[' token
   21 |             cin >> array[i][j];
      |                         ^
a.cc:22:21: error: expected initializer before '[' token
   22 |             array[i][c+1] += array[i][j];
      |                     ^
a.cc:22:21: error: expected ';' before '[' token
a.cc:23:20: error: expected ']' before '+' token
   23 |             array[r+1][j] += array[i][j];
      |                    ^
      |                    ]
a.cc:23:23: error: expected initializer before '[' token
   23 |             array[r+1][j] += array[i][j];
      |                       ^
a.cc:23:23: error: expected ';' before '[' token
a.cc:24:20: error: expected ']' before '+' token
   24 |             array[r+1][c+1] += array[i][j];
      |                    ^
      |                    ]
a.cc:24:23: error: expected initializer before '[' token
   24 |             array[r+1][c+1] += array[i][j];
      |                       ^
a.cc:31:26: error: missing template arguments before '[' token
   31 |             cout << array[i][j];
      |                          ^
Language: C++

nclude <iostream>
using namespace std;
 
int main(){
    int i, j, r, c;
    int array[102][102];
 
    cin >> r >> c;

    for (i = 1; i <= r + 1; i++){
        for (j = 1; j <= c + 1; j++){
            array[i][j] = 0;
        }
    }
 
    for (i = 1; i <= r; i++){
        for (j = 1; j <= c; j++){
            cin >> array[i][j];
            array[i][c+1] += array[i][j];
            array[r+1][j] += array[i][j];
            array[r+1][c+1] += array[i][j];
        }
    }
 
    for (i = 1; i <= r + 1; i++){
        for (j = 1; j <= c + 1; j++){
            if (j != 1) cout << " ";
            cout << array[i][j];
        }
        cout << endl;
    }
 
    return 0;
}

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude <iostream>
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:8:5: error: 'cin' was not declared in this scope
    8 |     cin >> r >> c;
      |     ^~~
a.cc:27:25: error: 'cout' was not declared in this scope
   27 |             if (j != 1) cout << " ";
      |                         ^~~~
a.cc:28:13: error: 'cout' was not declared in this scope
   28 |             cout << array[i][j];
      |             ^~~~
a.cc:30:9: error: 'cout' was not declared in this scope
   30 |         cout << endl;
      |         ^~~~
a.cc:30:17: error: 'endl' was not declared in this scope
   30 |         cout << endl;
      |                 ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
	int r,c;
	cin >> r >> c;
	int a[101][101]=0;
	for(int i=0 ; i<r ; ++i){
		for(int j=0 ; j<c ; ++j){
			cin >> a[i][j];
		}
	}
	for(int i=0 ; i<r ; ++i){
		for(int j=0 ; j<c ; ++j){
			cout << a[i][j] << " ";
			a[i][c+1] += a[i][j];
		}
		cout << a[i][c+1] << endl;
		a[r+1][c+1] += a[i][c+1];
	}
	for(int j=0 ; j<c ; ++j){
		for(int i=0 ; i<r ; ++i){
			a[r+1][j] += a[i][j];
		}
		cout << a[r+1][j] << " ";
	}
	cout << a[r+1][c+1] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: array must be initialized with a brace-enclosed initializer
    7 |         int a[101][101]=0;
      |                         ^
Language: C++

#include<iostream>
#include<cstdio>
using namespace std;

int main() {
    int r, c;
    int hyou[101][101] = {};
    cin >> r >> c;

    for (int i = 0; i < r; i++) {
        int sum = 0;
        for (int j = 0; j < c; j++) {
            cin >> hyou[i][j];
            sum += hyou[i][j];
        }
        hyou[i][c] = sum;
    }

    for (int j = 0; j < r; j++) {
        int sum = 0;
        for (int i = 0; i < c; i++) {
            sum += hyou[i][j];
        }
        hyou[r][j] = sum;
        hyou[r][c] += sum
    }

    for (int i = 0; i <= r; i++) {
        for (int j = 0; j <= c; j++) {
            cout << hyou[i][j];
            if (j != c) cout << " ";
        }

        cout << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:26: error: expected ';' before '}' token
   25 |         hyou[r][c] += sum
      |                          ^
      |                          ;
   26 |     }
      |     ~
Language: C++

#include<iostream>

using namespace std;

int main(){
	int n, m, x;
	cin >> n >> m;
	
	for ( int i = 0; i < n; i++ ){
		for ( int j = 0; j < m; j++ ){
			cin >> x;
			h[i][j] = x;
		}
	}

	
	for ( int i = 0; i < n; i++ ){
		int sum = 0;
		for (int j = 0; j < m; j++ ){
			sum += h[i][j]; 
			cout << h[i][j] << " ";
		}
		cout << sum <<endl;
	}
	
	int total = 0;
	
	for ( int j = 0; j < m; j++ ){
		int sum = 0;
		for ( int i = 0; i < n; i++ ){
			sum += h[i][j];
		}
		total += sum;
		cout << sum << " ";
	}
	cout << total <<endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: 'h' was not declared in this scope
   12 |                         h[i][j] = x;
      |                         ^
a.cc:20:32: error: 'h' was not declared in this scope
   20 |                         sum += h[i][j];
      |                                ^
a.cc:31:32: error: 'h' was not declared in this scope
   31 |                         sum += h[i][j];
      |                                ^
Language: C++

#<iostream>
using namespace std;

int main(){
     int r,c;
     cin<<r<<c;
     int a[r+1][c+1];
     for(int i=0;i<r;i++){
          for(int j;j<c;j++){
               cin>>a[i][j];
          }
     }
     for(int i=0;i<r;i++){
          for(int j=0;j<c;j++){
               a[i][c]+=a[i][j];
          }
     }
     for(int i=0;i<c;i++){
          for(int j=0;j<r;j++){
          a[r][i]+=a[j][i];
     }
     for(int i=0;i<r;i++){
          a[r][c]+=a[i][c];
     }
     for(int i=0;i<r;i++){
          for(int j;j<c;j++){
               cout<<a[i][j];
               if(j!=c-1) cout<<" ";
          }
          cout<<endl;
     }
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #<
    1 | #<iostream>
      |  ^
a.cc: In function 'int main()':
a.cc:6:6: error: 'cin' was not declared in this scope
    6 |      cin<<r<<c;
      |      ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #<iostream>
a.cc:27:16: error: 'cout' was not declared in this scope
   27 |                cout<<a[i][j];
      |                ^~~~
a.cc:27:16: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:30:11: error: 'cout' was not declared in this scope
   30 |           cout<<endl;
      |           ^~~~
a.cc:30:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:30:17: error: 'endl' was not declared in this scope
   30 |           cout<<endl;
      |                 ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #<iostream>
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#<iostream>
using namespace std;

int main(){
     int r,c;
     cin>>r>>c;
     int a[r+1][c+1];
     for(int i=0;i<r;i++){
          for(int j;j<c;j++){
               cin>>a[i][j];
          }
     }
     for(int i=0;i<r;i++){
          for(int j=0;j<c;j++){
               a[i][c]+=a[i][j];
          }
     }
     for(int i=0;i<c;i++){
          for(int j=0;j<r;j++){
          a[r][i]+=a[j][i];
     }
     for(int i=0;i<r;i++){
          a[r][c]+=a[i][c];
     }
     for(int i=0;i<r;i++){
          for(int j;j<c;j++){
               cout<<a[i][j];
               if(j!=c-1) cout<<" ";
          }
          cout<<endl;
     }
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #<
    1 | #<iostream>
      |  ^
a.cc: In function 'int main()':
a.cc:6:6: error: 'cin' was not declared in this scope
    6 |      cin>>r>>c;
      |      ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #<iostream>
a.cc:27:16: error: 'cout' was not declared in this scope
   27 |                cout<<a[i][j];
      |                ^~~~
a.cc:27:16: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:30:11: error: 'cout' was not declared in this scope
   30 |           cout<<endl;
      |           ^~~~
a.cc:30:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:30:17: error: 'endl' was not declared in this scope
   30 |           cout<<endl;
      |                 ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #<iostream>
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
     int r,c;
     cin>>r>>c;
     int a[r+1][c+1];
     for(int i=0;i<r;i++){
          for(int j;j<c;j++){
               cin>>a[i][j];
          }
     }
     for(int i=0;i<r;i++){
          for(int j=0;j<c;j++){
               a[i][c]+=a[i][j];
          }
     }
     for(int i=0;i<c;i++){
          for(int j=0;j<r;j++){
          a[r][i]+=a[j][i];
     }
     for(int i=0;i<r;i++){
          a[r][c]+=a[i][c];
     }
     for(int i=0;i<r;i++){
          for(int j;j<c;j++){
               cout<<a[i][j];
               if(j!=c-1) cout<<" ";
          }
          cout<<endl;
     }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:2: error: expected '}' at end of input
   32 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
	
	int r,c,a[100][100],yoko[100]={0},tate[100]={0},total=0,i,j;
	cin>>r>>c;
	for(i=0;i<r;i++){
		for(j=0;j<c;j++){
			cin>>a[i][j];
			total=total+a[i][j];
			yoko[i]=yoko[i]+a[i][j];
			tate[j]=tate[j]+a[i][j];
		}
	}
	for(i=0;i<=r;i++){
		for(j=0;j<=c;j++){
			cout<<a[i][j]<<" "<<;
			if(j==c){
				cout<<yoko[i]<<endl;
			}
		}
		for(int k=0;k<c;k++){
			cout<<tate[k]<<" ";
		}
	}
	cout<<total<<endl;		
			
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:45: error: expected primary-expression before ';' token
   17 |                         cout<<a[i][j]<<" "<<;
      |                                             ^
Language: C++

#include <iostream>
using namespace std;


int _tmain(int argc, _TCHAR* argv[])
{
	int table[101][101] = {0};
	int r,c;
	cin>>r>>c;
	for(int i = 0; i < r ; i++){
		for(int j = 0 ; j < c; j++ ){
			cin>>table[i][j];
			table[i][c] += table[i][j];
			table[r][j] += table[i][j];
		}
		table[r][c] += table[i][c];
	}
	for(int i = 0; i <= r; i++){
		for(int j=0; j <= c ; j++){
			if( j != c){
				cout<<table[i][j]<<" ";
			}else{
				cout<<table[i][j]<<endl;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc:5:22: error: '_TCHAR' has not been declared
    5 | int _tmain(int argc, _TCHAR* argv[])
      |                      ^~~~~~
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int r, c, A[100][100], R[100], C[100], f;
	int sum = 0;

	for (int i = 0; i < 100; i++){
		for (int j = 0; j < 100; j++){
			A[i][j] = 0;
		}
	}

	cin >> r >> c;

	for (int i = 0; i < r; i++){
		for (int j = 0; j < c; j++){
			cin >> A[i][j];
		}
	}

	for (int i = 0; i < r; i++){
		for (int j = 0; j < c; j++){
			sum += A[i][j];
		}
		R[i] = sum;
		sum = 0;
	}

	for (int i = 0; i < c; i++){
		for (int j = 0; j < r; j++){
			sum += A[j][i];
		}
		C[i] = sum;
		sum = 0;
	}

	for (int i = 0; i < r; i++){
		for (int j = 0; j < c; j++){
			sum += A[i][j];
		}
	}
	f = sum;

	for (int i = 0; i < r; i++){
		for (int j = 0; j < c; j++){
			cout << " " <<A[i][j];

		}
		cout << " " << R[i] << endl;
	}

	for (int i = 0; i < c; i++){
		cout << " " << C[i];
	}
	cout << " " << f???

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:26: error: expected primary-expression before '?' token
   57 |         cout << " " << f???
      |                          ^
a.cc:57:27: error: expected primary-expression before '?' token
   57 |         cout << " " << f???
      |                           ^
a.cc:59:9: error: expected primary-expression before 'return'
   59 |         return 0;
      |         ^~~~~~
a.cc:57:28: error: expected ':' before 'return'
   57 |         cout << " " << f???
      |                            ^
      |                            :
   58 | 
   59 |         return 0;
      |         ~~~~~~              
a.cc:59:9: error: expected primary-expression before 'return'
   59 |         return 0;
      |         ^~~~~~
a.cc:57:28: error: expected ':' before 'return'
   57 |         cout << " " << f???
      |                            ^
      |                            :
   58 | 
   59 |         return 0;
      |         ~~~~~~              
a.cc:59:9: error: expected primary-expression before 'return'
   59 |         return 0;
      |         ^~~~~~
a.cc:57:28: error: expected ':' before 'return'
   57 |         cout << " " << f???
      |                            ^
      |                            :
   58 | 
   59 |         return 0;
      |         ~~~~~~              
a.cc:59:9: error: expected primary-expression before 'return'
   59 |         return 0;
      |         ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int c[101][101], x, y, num = 0;
	cin >> x >> y;
	for (int i = 0; i<x; i++) {
		for (int j = 0; j<y; j++) {
			cin >> c[i][j];
			num += c[i][j];
		}
		c[i][y] = num;
		num = 0;
	}
	for (int j = 0; j<=y; j++) {
		for (int i = 0; i<x; i++) {
			num += c[i][j];
		}
		c[x][j] = num;
		num = 0;
	}
	for (int i = 0; i<=x; i++) {
		for (int j = 0; j<=y; j++) {
			cout << c[i][j] << " ";
		}
		cout << endl;
	}


	return 0;
}
#include <iostream>
using namespace std;

int main() {
	int c[101][101], x, y, num = 0;
	cin >> x >> y;
	for (int i = 0; i<x; i++) {
		for (int j = 0; j<y; j++) {
			cin >> c[i][j];
			num += c[i][j];
		}
		c[i][y] = num;
		num = 0;
	}
	for (int j = 0; j<=y; j++) {
		for (int i = 0; i<x; i++) {
			num += c[i][j];
		}
		c[x][j] = num;
		num = 0;
	}
	for (int i = 0; i<=x; i++) {
		for (int j = 0; j<=y; j++) {
			cout << c[i][j] << " ";
		}
		cout << endl;
	}


	return 0;
}

Compiler output:
a.cc:35:5: error: redefinition of 'int main()'
   35 | int main() {
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main() {
      |     ^~~~