int z[5][4];
srand(static_cast<unsignedint>(time(0)));
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 4; j++)
{
z[i][j] = rand() % 10 + 1;
cout << setw(3) << z[i][j];
}
cout << endl;
}
int sum = 0; int max = -1;
int row;
for (int i = 0; i < 5; i++)
{
sum = 0;
for (int j = 0; j < 4; j++)
{
sum = sum + z[i][j];
}
if (sum>max)
{
max = sum;
row = i;
}
}
cout << "The biggest sum is " << sum << " the row is " << row << endl;