for min matrix for if min matrix min matrix mas min for min for if mas

 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
for (i = 0; i < 7; i++)
{
min = matrix[i, 0];
for (q = 0; q < 4; q++)
{
if (min > matrix[i, q])
min = matrix[i, q];
}
mas[i] = min;
}
for (i = 0; i < 6; ++i)
{
min = i;
for (j = i + 1; j < 7; ++j)
if ( mas[min] > mas[j])
min = j;
if ( mas[i] < mas[min] )
{
for (k = 0; k < 5; k++)
{
mas[k] = matrix[i, k];
matrix[i, k] = matrix[min, k];
matrix[min, k] = mas[k];
}
}
}