Public Class 例5_3

    Private Sub 例5_3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim A(4, 4), i, j, k, s As Integer
        s = 0
        For i = 0 To 4
            For j = 0 To 4
                A(i, j) = Int(Rnd() * 100) + 1
            Next
        Next
        For Each k In A
            If k Mod 2 = 0 Then
                s = s + k
            End If
        Next
        Console.Write("结果为:" & s)

    End Sub
End Class