Visual Basic NET ( 3)


         

ByVal As Integer, ByVal


(3, B)
Dim i As Integer
For i = 0 To 3 '
Debug.WriteLine(A(i) & " " & B(i))
Next
End Sub
Sub ( ByVal As Integer, ByVal c() As Integer)
Dim i As Integer
For i = 0 To 3
c(i) = c(i) +
Next
End Sub
: , c ByVal ByRef. , . , ByVal .
122.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Debug.WriteLine(fib(30))
End Sub
Private Function fib(ByVal N As Integer) As Decimal
If N = 1 Or N = 2 Then fib = 1 Else fib = fib(N - 2) + fib(N - 1) ' !
End Function
' .
' N , .
' .
' ? ,
' fib. . F11.
123.
Sub puziryok_3(ByVal mass1() As String, ByVal mass2() As Integer, ByVal mass3() As Integer, ByVal N As Integer)
Dim i, c, m As Integer
Dim s As String '
For m = N To 1 Step -1
For i = 0 To m - 1
If mass3(i) > mass3(i + 1) Then
s = mass1(i) : mass1(i) = mass1(i + 1) : mass1(i + 1) = s ' 1
c = mass2(i) : mass2(i) = mass2(i + 1) : mass2(i + 1) = c ' 2
c = mass3(i) : mass3(i) = mass3(i + 1) : mass3(i + 1) = c ' 3

    





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