Module Module1
Sub Main()
Dim i As Integer = 5
Dim j, res As Integer
res = fun(i, j)
Console.WriteLine(j & " " & res)
Console.ReadKey()
End Sub
Function fun(ByVal x As Integer, ByRef y As Integer) As Integer
y = x * x
Return x * x * x
End Function
End Module
output
25 125
No comments:
Post a Comment