Professional Documents
Culture Documents
Swapping of Numbers
Swapping of Numbers
Aim:
To find the swapping of the given numbers using visual basic .net
console application
codings
Module Module1
Sub Main()
Dim a, b, f As Integer
Console.WriteLine("enter a")
a = Console.ReadLine()
Console.WriteLine("enter b")
b = Console.ReadLine()
Console.WriteLine("call by value")
Call swapval(a, b)
Console.WriteLine("a={0},b={1}", a, b)
Console.WriteLine("call by ref")
Call swapref(a, b)
Console.WriteLine("a={0},b={1}", a, b)
Console.ReadLine()
Console.WriteLine("enter to find the fact")
f = Console.ReadLine
Console.WriteLine("factorial is={0}", fact(f))
Console.ReadLine()
End Sub
End Module
Output: