VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Theorem of Pythagoras

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

Rate Theorem of Pythagoras



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

Download this snippet    Add to My Saved Code

Theorem of Pythagoras Comments

No comments have been posted about Theorem of Pythagoras. Why not be the first to post a comment about Theorem of Pythagoras.

Post your comment

Subject:
Message:
0/1000 characters