Dim x(5) As Integer, y(5) As Integer, l As Integer
Dim z(5, 5) As Integer, s As Integer, k As Integer, max As Integer, elm As Integer, maxx(5) As Integer
Private Sub Command1_Click()
For i = 1 To 5
x(i) = Int(Rnd(1) * 10)
Next i
For j = 1 To 5
y(j) = Int(Rnd(1) * 10)
Next j
For i = 1 To 5
For j = 1 To 5
z(i, j) = ((x(i) ^ 2) + y(j)) ^ (1 / 3)
Print z(i, j),
Next j
Print
Next i
Print
End Sub
Private Sub Command2_Click()
k = 0
For i = 1 To 5
For j = 1 To 5
If z(i, j) < 1 Then k = k + 1
Next j
l = 0
If k > 0 Then l = l + 1
Next i
Print "Число строк,имеющих элементы мненьше еденицы " & l
End Sub
Private Sub Command3_Click()
s = 0
For i = 1 To 5
For j = 1 To 5
If i = j Then
If z(i, j) > 0 Then s = s + z(i, j)
End If
Next j
Next i
Print "Сумма положительных элементов: " & s
End Sub
Private Sub Command4_Click()
For i = 1 To 5
max = z(i, 1)
For j = 1 To 5
If z(i, j) > max Then max = z(i, j)
Next j
maxx(i) = max
elm = maxx(i)
z(i, i) = maxx(i)
maxx(i) = elm
Next i
For i = 1 To 5
For j = 1 To 5
Print z(i, j),
Next j
Print
Next i
Print
End Sub