logo CodeStepByStep logo

ParameterMysterySection1

Language/Type: VB parameters

The following console program uses parameters and produces three lines of output. What are they?

Public Module ParameterMysterySection1
    Public Sub Main()
        Dim a As Integer = 4
        Dim b As Integer = 7
        Dim c As Integer = -2

        M(a, b, c)
        M(c, 3, a)
        M(a + b, b + c, c + a)
    End Sub

    Public Sub M(c As Integer, a As Integer, b As Integer)
        Console.WriteLine(b & " + " & c & " = " & a)
    End Sub
End Module
line 1
line 2
line 3

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.