Posts

Showing posts from February 22, 2017

Area of Rectangle

Module Module1 Sub Main() 'Program to find the area of the rectangle Dim length, breadth, Area As Integer Console.Write("Enter the length of the rectangle: ") length = Console.ReadLine Console.Write("Enter the breadth of the rectangle: ") breadth = Console.ReadLine Area = length * breadth Console.WriteLine("The area of the rectangle is: " & Area) Console.ReadKey() 'This line of code is used to hold the output window to see the output End Sub End Module

Print Hello World in a message box

Module Module1 Sub Main() 'program to print "Hello World" in the output window Dim msg As String msg = "Hello World" MsgBox(msg) End Sub End Module

Print Hello World

Module Module1 Sub Main() 'program to print "Hello World" in the output window Dim msg As String msg = "Hello World" Console.WriteLine(msg) Console.ReadKey() End Sub End Module