How to calculate the area of a circle with constant PI in VB.NET

1 Answer

0 votes
Module Module1

    Sub Main()

        Const PI = 3.14
        Dim radius, area As Single

        radius = 13
        area = PI * radius * radius

        Console.WriteLine("Area = {0}", area)

    End Sub

End Module

' run:
' 
' Area = 530.66

 



answered Apr 27, 2016 by avibootz

Related questions

...