Visual Basic NET ( 3)


         

Dim i, j, Min, Max


Dim t(,) As Integer = {{99, 99, 99, 99, 99}, {99, -8, -14, -19, -18}, {99, 25, 28, 26, 20}, {99, 11, 18, 20, 25}}
Dim i, j, Min, Max As Integer
Min = t(1, 1) : Max = t(1, 1)
For i = 1 To 3
For j = 1 To 4
If t(i, j) > Max Then Max = t(i, j)
If t(i, j) < Min Then Min = t(i, j)
Next j
Next i
Debug.Write(Max - Min)
End Sub
47.
120.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a() As Integer = {5, 4, 2, 4, 3, 5, 5, 3, 4, 3} '
Dim b() As Integer = {3, 4, 3, 4, 3, 5, 4, 4, 3, 4, 4, 4, 4, 3, 4, 4} '
If (a) < (b) Then Debug.WriteLine(" ") _
Else Debug.WriteLine(" ")
End Sub
Function (ByVal c() As Integer) As Integer
Dim i As Integer
= c(0)
For i = 1 To c.Length - 1
If c(i) < Then = c(i)
Next
End Function
Function (ByVal c() As Integer) As Integer
Dim i As Integer
= c(0)
For i = 1 To c.Length - 1
If c(i) > Then = c(i)
Next
End Function
Function (ByVal c() As Integer) As Integer
= (c) - (c)
End Function
121.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' , 4
Dim A() As Integer = {25, 22, 18, 20} ' A
Dim B() As Integer = {4, 5, 4, 4} ' B
(-2, A)

    





Forekc.ru
, , , , , , , , , ,