Module Module2 Sub Main() Dim result As Integer Dim x, y As Integer Console.Write("Enter value1:") x = CInt(Console.ReadLine) Console.Write("Enter value2:") y = CInt(Console.ReadLine) result = sum2values(x, y) 'calling the function with 2 parameters Console.WriteLine("Result=" & result) Console.ReadLine() End Sub 'defining a function with 2 parameters Function sum2values(ByVal x, ByVal y) sum2values = x + y End Function End Module
Visual Basic dot net VB.net programming microsoft .net framework object oriented language network enabled technology visual basic 2005 IDE integrated development environment console application microsoft cre common runtime environment
Summation Using Function 3
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment