Module SwapByFunction Sub Main() Dim a, b As Integer swap(a, b) Console.ReadLine() End Sub Sub swap(ByVal a, ByVal b) Dim t As Integer Console.Write("a = ") a = CInt(Console.ReadLine()) Console.Write("b = ") b = CInt(Console.ReadLine()) Console.WriteLine() Console.WriteLine("Before Swapping...") Console.WriteLine("a = " + a.ToString() + " b = " + b.ToString()) t = a a = b b = t Console.WriteLine() Console.WriteLine("After Swapping...") Console.WriteLine("a = " + a.ToString() + " b = " + b.ToString()) End Sub 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
Swapping of 2 integers Using Function
Subscribe to:
Post Comments (Atom)
Could you please explain how the call by value works?
ReplyDeletehttps://saglamproxy.com
ReplyDeletemetin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
TGGAA4