by Varun Godbole (15 Submissions)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 11th November 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Theorem of Pythagoras
API Declarations
3 command buttons
Private Sub Command1_Click()
a = Val(hyp.Text)
b = Val(side1.Text)
c = (a^2) - (b^2)
d = c ^ (0.5)
side2.Text = Str$(d)
End Sub
'to find hypotenuse
Private Sun Command2_Click()
a = Val(side1.Text)
b = Val(side2.Text)
c = (a^2) + (b^2)
d = c ^ (0.5)
hyp.Text = Str$(d)
End Sub
'to find side 1
Private Sun Command3_Click()
a = Val(hyp.Text)
b = Val(side2.Text)
c = (a^2) - (b^2)
d = c ^ (0.5)
side1.Text = Str$(d)
End Sub