SLIP
15_1
Option
Explicit
Private
Sub cmdRoot_Click()
Dim
a As Integer
Dim
b As Integer
Dim
c As Integer
Dim
root1 As Double
Dim
root2 As Double
Dim
underroot As Integer
a =
Val(Text1.Text)
b =
Val(Text2.Text)
c =
Val(Text3.Text)
underroot
= Math.Sqr(b * b - 4 * a * c)
Print
underroot
root1
= (-b + underroot) / (2 * a)
root2
= (-b - underroot) / (2 * a)
lblRoot1.Caption
= root1
lblRoot2.Caption
= root2
End
Sub
Private
Sub Text1_Click()
Text1.Text
= ""
End
Sub
Private
Sub Text2_Click()
Text2.Text
= ""
End
Sub
Private
Sub Text3_Click()
Text3.Text
= ""
End
Sub
No comments:
Post a Comment
Note: only a member of this blog may post a comment.