Home >>VB.Net Programs >VB.Net program to produce the full product of two 32-bit integer numbers

VB.Net program to produce the full product of two 32-bit integer numbers

Write a VB.Net program to produce the full product of two 32-bit integer numbers

Here, using the BigMul() Math class method, we can get the full product of two 32-bit integer numbers and print the product on the console screen.

Program :

Below is the source code for producing the full product of two 32-bit integer numbers. The program given is compiled and successfully executed.

Example


Module Module1

    Sub Main()
        Dim X As Integer = 123456
        Dim Y As Integer = 654321
        Dim product As Long = 0

        product = Math.BigMul(X, Y)
        
        Console.WriteLine("Multiplication is : {0}", product)

    End Sub
End Module
	
Output:
Multiplication is : 80779853376

Explanation:

We created a Module1 module in the program above that contains the Main() method. We created two local variables X, Y in the Main() method that are initialized with 12345 and 654321, respectively.

product = Math.BigMul(X, Y)
Console.WriteLine("Multiplication is : {0}", product)

We used the BigMul() method in the above code to achieve the full multiplication of two 32-bit integer numbers.


No Sidebar ads