Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In a right triangle, the square of the length of one side is equal to the sum of

ID: 3655590 • Letter: I

Question

In a right triangle, the square of the length of one side is equal to the sum of the squares of the lengths of the other two sides. Stephanie has the integer lengths of three sides of a triangle and needs to know if it is a right triangle.

Write a program to solve this problem.

4. Identify five significant test cases including one for incorrect input (ie. Input a letter rather than a digit for the numeric input). (Think about what impact changing the order of the input values should have on your program!) For each of the five test cases show what inputs you will use and calculate what your expected outputs should be. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /?>


I would like a program that doesnt close or error when a letter is typed instead of a number, as indicated in question #4.

Explanation / Answer

use this function anywhere.... bool IsRightTriangle(int x, int y, int z){ if ((x^2 + y^2 ==z^2) || (x^2 + z^2 ==y^2) || (y^2 + z^2 ==x ^2)) { return 1;} else return 0;}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote