Лабораторная работа: Расположение элементов в матрице
pi = Int(p / 10)
pj = p - pi * 10
k = k + 1
a(pi, pj) = x(k)
Next j
Next t
Next i
For i = 1 To n - 1
p = p - 1
pi = Int(p / 10)
pj = p - pi * 10
k = k + 1
a(pi, pj) = x(k)
Next i
txtResult.Text = Empty
For i = 1 To n
For j = 1 To n
txtResult.Text = txtResult.Text & Str(a(i, j)) & " "
Next j
txtResult.Text = txtResult.Text & vbCrLf
Next i
cmdPrint.Enabled = True
cmdSave.Enabled = True
End Sub
Private Sub cmdSave_Click()
Open App.Path & "\Result.txt" For Output As #1
Print #1, "Задание №46" & vbCrLf & vbCrLf
Print #1, "Исходная матрица:" & vbCrLf
Print #1, txtOriginal.Text & vbCrLf