Dim A(1 To 10, 1 To 10) As Integer
Dim F(100, 100) As Integer
Dim C(100, 100) As Integer
Dim STR(100) As Integer
Dim S(100) As Integer
Dim R(100, 100) As Integer
Dim K(100, 100) As Integer
Dim READY(10, 10) As Integer
Private Sub Command1_Click()
File = Text1
n = Val(Text2)
m = Val(Text3)
l = Val(Text4)
Open File For Input As #1
For i = 1 To 10
For j = 1 To 10
Input #1, A(i, j)
Next j
Next i
Close #1
For i = 1 To n
For j = 1 To m
F(i, j) = A(i, j)
Next j
Next i
MSFlexGrid1.Rows = n + 1
MSFlexGrid1.Cols = m + 1
MSFlexGrid1.Row = 0
For j = 1 To m
MSFlexGrid1.Col = j
MSFlexGrid1.ColWidth(j) = 700
MSFlexGrid1.Text = j
Next j
MSFlexGrid1.Col = 0
MSFlexGrid1.ColWidth(0) = 300
For i = 1 To n
MSFlexGrid1.Row = i
MSFlexGrid1.Text = i
Next i
For i = 1 To n
MSFlexGrid1.Row = i
For j = 1 To m
MSFlexGrid1.Col = j
MSFlexGrid1.Text = F(i, j)
Next j
Next i
'
'
'
'
' здесь надо вписать код для выполнения задания, но никак не получается его составить
'
'
'
'
'
'
'
'
'
For i = 1 To n
For j = 1 To m
C(i, j) = F(i, j)
Next j
Next i
Max = 0
For j = 1 To m
Min = Abs(F(n, j))
For i = 1 To n
If Abs(F(i, j)) < Min Then
Min = Abs(F(i, j))
fs = i
End If
If Abs(F(i, j)) > Max Then Max = Abs(F(i, j))
Next i
C(fs, j) = Max
Max = 0
Next j
MSFlexGrid2.Rows = n + 1
MSFlexGrid2.Cols = m + 1
MSFlexGrid2.Row = 0
For j = 1 To m
MSFlexGrid2.Col = j
MSFlexGrid2.ColWidth(j) = 700
MSFlexGrid2.Text = j
Next j
MSFlexGrid2.Col = 0
MSFlexGrid2.ColWidth(0) = 300
For i = 1 To n
MSFlexGrid2.Row = i
MSFlexGrid2.Text = i
Next i
For i = 1 To n
MSFlexGrid2.Row = i
For j = 1 To m
MSFlexGrid2.Col = j
MSFlexGrid2.Text = C(i, j)
Next j
Next i
For i = 1 To n
For j = 1 To m
READY(i, j) = F(i, j)
Next j
Next i
For i = 1 To n
R(i, 1) = F(i, 1)
K(i, m) = F(i, m)
Next i
For i = 1 To n
For j = 1 To n
READY(i, 1) = K(i, m)
READY(i, m) = R(i, 1)
Next j
Next i
MSFlexGrid4.Rows = n + 1
MSFlexGrid4.Cols = m + 1
MSFlexGrid4.Row = 0
For j = 1 To m
MSFlexGrid4.Col = j
MSFlexGrid4.ColWidth(j) = 700
MSFlexGrid4.Text = j
Next j
MSFlexGrid4.Col = 0
MSFlexGrid4.ColWidth(0) = 300
For i = 1 To n
MSFlexGrid4.Row = i
MSFlexGrid4.Text = i
Next i
For i = 1 To n
MSFlexGrid4.Row = i
For j = 1 To m
MSFlexGrid4.Col = j
MSFlexGrid4.Text = READY(i, j)
Next j
Next i
End Sub