VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Calculate the area of a circle

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)

Rate Calculate the area of a circle



 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

Download this snippet    Add to My Saved Code

Calculate the area of a circle Comments

No comments have been posted about Calculate the area of a circle. Why not be the first to post a comment about Calculate the area of a circle.

Post your comment

Subject:
Message:
0/1000 characters