include iostream include windows include conio const int кол во строк

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <iostream.h>
#include <windows.h>
#include <conio.h>
const int N = 2; //кол - во строк
const int M = 3; //кол - во столбцов
void Vvod(int matrix[N][M])
{
for (int i = 0; i < N; i++)
for (int j = 0; j < M; j++)
cin>>"%i", &matrix[i][j]);
}
int Max(int matrix[N][M], int ind)
{
int max = matrix[0][ind];
for (int i = 0; i < N; i++)
{
if (max < matrix[i][ind]) max = matrix[i][ind];
}
return max;
}
void main()
{
int matrix[N][M];
int S = 1;
Vvod(matrix);
for (int i = 0; i < M; i++)
S *= Max(matrix, i);
Cout<<"%i", S<<endl;
getch();
}