logo CodeStepByStep logo

ParameterMysteryExam3

Language/Type: VB parameters return

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

Public Module ParameterMysteryExam3
    Public Sub Main()
        Dim a As Integer = 5
        Dim b As Integer = 1
        Dim c As Integer = 3
        Dim three As Integer = a
        Dim one As Integer = b + 1

        Axiom(a, b, c)
        Axiom(c, three, 10)
        three = Axiom(b + c, one + three, a + one)
        a += 1
        b = 0
        a = Axiom(three, 2, one)
    End Sub

    Public Function Axiom(c As Integer, b As Integer, a As Integer)
        Console.WriteLine(a & " + " & c & " = " & b)
        Return a + b
    End Function
End Module
line 1
line 2
line 3
line 4

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.