#include
#include
#include
#include
using namespace std;
int main()
{
const int size = 4;
int mat[size][size];
srand(time(NULL));
for (int i = 0; i < size; i++)
{
for (int j = 0; j < size; j++)
{
mat[i][j] = 0 + rand() % 11;
}
}
cout << " Matrix:" << '\n';</p>
for (int i = 0; i < size; i++)
{
for (int j = 0; j < size; j++)
{
cout << setw(4) << mat[i][j];</p>
}
cout << '\n' << '\n';</p>
}
int sum = 0;
for (int i = 0; i < size; i++)
{
for (int j = size; j < size; j++)
{
sum += mat[i][j];
}
}
cout << "Sum:" << sum << '\n';</p>
return 0;