VB.Net Program to get Product of two Numbers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
Module Module1 Sub Main() Dim x, y As Integer Dim result As Integer Console.WriteLine("*** www.ProgrammingPosts.blogspot.com ***") Console.WriteLine(">>> VB.NET PROGRAM FOR PRODUCT OF TWO NUMBERS <<< ") 'vblf gets the cursor to next line in console Console.Write(vbLf & " Enter the first number : ") ' reading 1st number from user x = Convert.ToInt32(Console.ReadLine()) 'converting input to type int Console.Write(vbLf & " Enter the second number: ") ' reading 2nd number from user y = Convert.ToInt32(Console.ReadLine()) 'converting input to type int ' storing the product in result result = x * y 'printing the result Console.WriteLine(vbLf & " The product of two numbers is: {0} ", result) Console.ReadLine() End Sub End Module |
Sample Output: