In this post, we will see a VB.Net Program to read two number inputs from user and display the sum.

The program below accepts two numbers from user and perform basic arithmetic operation(addition) using + operator and display the sum on screen.

For algorithm & flowchart to add two numbers, go through the post given below.

Program :

Module Module1

    Sub Main()
        Dim num1, num2, sum As Integer

        Console.WriteLine(">>> VB>NET Console program to add two integers <<<")
        Console.Write(" Enter the first number to be added: ")
        num1 = Convert.ToInt32(Console.ReadLine())
        Console.Write(" Enter the second number to be added: ")
        num2 = Convert.ToInt32(Console.ReadLine())
        sum = num1 + num2
        Console.Write(Environment.NewLine & " The sum of two numbers is:" & sum)

    End Sub

End Module
Sample Output :
VB.Net Add Two Integers

Leave a Reply

Your email address will not be published. Required fields are marked *