Exercise
Sum of two numbers
Objetive
Write a Visual Basic (VB.Net) program to print the result of adding 12 and 13 on screen.
Code
' Main class definition
Public Class Program
' Main subroutine, entry point of the program
Public Shared Sub Main()
' Declare and initialize two integers
Dim number1 As Integer = 12
Dim number2 As Integer = 13
' Calculate the sum of the two numbers
Dim sum As Integer = number1 + number2
' Display the result of the sum on the screen
Console.WriteLine("The result of adding 12 and 13 is: " & sum)
End Sub
End Class