Контрольная работа: Составление программы на алгоритмическом языке, выполняющей указанные преобразования с матрицами
Private Sub cmdPrint_Click()
Me.PrintForm
End Sub
Private Sub cmdRun_Click()
txtN.Enabled = False
Dim i As Integer, j As Integer
Dim t As Integer, n As Integer
Dim k As Integer, p As Integer
n = Val(txtN.Text)
txtOriginal = Empty
Dim MV As Integer
MV = n ^ 2 / 2 + n
ReDim a(n, n) As Integer
ReDim x(MV) As Integer
Randomize Timer
For i = 1 To MV
x(i) = Int(Rnd * 90) + 10
txtOriginal = txtOriginal & Str(x(i)) & " "
Next i
k = 0
For i = n To n / 2 - 1 Step -1
If i / 2 = Int(i / 2) Then
For j = n - i + 1 To i
k = k + 1: a(i, j) = x(k)
Next j
Else
For j = i To n - i + 1 Step -1
k = k + 1: a(i, j) = x(k)
Next j