Module SumUsingFunction Sub Main() Dim i, j, s As Integer Console.Write("Enter 1st Number: ") i = CInt(Console.ReadLine()) Console.Write("Enter 2nd Number: ") j = CInt(Console.ReadLine()) s = sum(i, j) Console.WriteLine("Sum of " + i.ToString() + " + " + j.ToString() + " = " + s.ToString()) Console.ReadLine() End Sub Function sum(ByVal a As Integer, ByVal b As Integer) As Integer sum = a + b 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 1
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment