TheChos
asked on
Hypotenuse
The lengths of the two sides of a right triangle are 12 inches and 5 inches. Write a program that calculates the length of the hypotenuse and display the lengths of the two sides and the hypotenuse on the screen.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
This sounds like homework. Experts can assist you with YOUR code, but should not provide code of their own - it is in the rules.
If this is truly a Visio question, you don't even need code. You can do it in the ShapeSheet!
Draw a right triangle.
Insert a (text) field, choose Custom Formula, enter =SQRT(Width^2 + Height^2), select a number format option, then click OK.
The shape will display the length of the hypotenuse no matter how you stretch the width and height of the shape!
Draw a right triangle.
Insert a (text) field, choose Custom Formula, enter =SQRT(Width^2 + Height^2), select a number format option, then click OK.
The shape will display the length of the hypotenuse no matter how you stretch the width and height of the shape!