Imports System
Public Class Program
Public Shared Sub matrix_x_vector(ByVal matrix As Integer(,), ByVal vector As Integer(), ByVal multiplied_array As Integer())
Dim rows As Integer = matrix.GetLength(0)
Dim cols As Integer = matrix.GetLength(1)
For i As Integer = 0 To rows - 1
For j As Integer = 0 To cols - 1
multiplied_array(i) += matrix(i, j) * vector(j)
Next
Next
End Sub
Public Shared Sub Main()
Dim matrix As Integer(,) = {
{0, 3, 5},
{5, 7, 2}}
Dim vector As Integer() = {2, 4, 3}
Dim multiplied_array As Integer() = {0, 0}
matrix_x_vector(matrix, vector, multiplied_array)
For Each n As Integer In multiplied_array
Console.Write(n & " ")
Next
End Sub
End Class
' run:
'
' 27 44
'