I have posted an attachment of my code. I am having difficulties getting it so that 3,5,4 will display as a right triangle but 3,4,5 will.
Can someone give me an idea of where I should go to fix or how to fix it?
Thanks.
I have posted an attachment of my code. I am having difficulties getting it so that 3,5,4 will display as a right triangle but 3,4,5 will.
Can someone give me an idea of where I should go to fix or how to fix it?
Thanks.
Well, let's look at your code that determines if it is a right trianle.
If (s1s + s2s = s3s) Then
' Display the result
triResult = "You have created a right triangle!"
End If
If s1=3, s2=5, and s3 =4 will the above test that you defined be true?
Have you learned how to use either arrays or lists yet? If, consider loading your values into an array and sorting it low to high. The high value will be the hypotenuse. Then you can calculate the squares and run your tests.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.