VB.Net Program to Calculate the Area of the Rectangle

You are currently viewing VB.Net Program to Calculate the Area of the Rectangle

VB.Net program to calculate the area of the rectangle

'VB.Net program to calculate the area of the rectangle.

Module Module1

    Sub Main()

        Dim length As Single = 0.0F
        Dim breadth As Single = 0.0F
        Dim area As Single = 0.0F

        Console.Write("Enter the length of rectangle: ")
        length = Single.Parse(Console.ReadLine())

        Console.Write("Enter the breadth of rectangle: ")
        breadth = Single.Parse(Console.ReadLine())

        area = length * breadth

        Console.WriteLine("Area of ractangle: {0}", area)

    End Sub

End Module

Output

Enter the length of rectangle: 19
Enter the breadth of rectangle: 3.2
Area of rectangle: 60.8
Press any key to continue . . .

Ranjith Kumar

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply