by Randy Houck (6 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 25th October 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Calculate the area of a circle
API Declarations
'make 2 command buttons (cmdcalculate) (cmdDone)
'make a label (lblanswer)
Const pi As Double = 3.14
Dim Radiues As Double
Dim circleArea As Double
Debug.Print "Radius="; radius 'debug
radius = Text1.Text
Debug.Print "Radius="; radius 'debug
circleArea = pi * radius ^ 2
Debug.Print "circleArea="; circleArea 'debug
lblAnswer.Caption = circleArea
End Sub
Private Sub cmdDone_Click()
Unload Me
End Sub