/*VS C++*/
#include
#include
#include
using namespace std;
int main() {
int N, M, sum;
cout << "Vvedite N = "; cin >> N;
cout << "Vvedite M = "; cin >> M;
int **Arr = new int* [N];
for (int i = 0; i < N; i++)
Arr[i] = new int [M];
srand(time(0));
for (int i = 0; i < N; i++)
for (int j = 0; j < M; j++)
Arr[i][j] = rand() % 51;
for (int i = 0; i < N; i++)
{
for (int j = 0; j < M; j++)
cout << setw(4) << setprecision(2) << Arr[i][j] << " ";<br> cout << endl;<br> }
cout << endl;<br> for (int j = 0; j < M; j++)
{
sum = 0;
for (int i = 0; i < N; i++)
sum = sum + Arr[i][j];
cout << setw(4) << setprecision(2) << sum << " ";<br> }
cout << endl;<br> system("pause");
return 0;
}