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
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. Write a program that prompts the user to enter the lengths of three sides of a triangle and then outputs a message indicating whether the triangle is a right triangle. If the triangle is a right triangle, output It is a right angled triangle If the triangle is not a right triangle, output It is not a right angled triangle
Right triangle test case 1
Input
3 4 5
Output
Enter the length of three sides. 3 4 5 It is a right triangle
Input
3 4 6
Output
Enter the length of three sides. 3 4 6 It is not a right triangle.
Input
5 12 13
Output
Enter the length of three sides. 5 12 13 It is a right triangle
Side 1 test
Input
5 4 3
Output
Enter the length of three sides. 5 4 3 It's a right triangle
Side 2 test
Input
7 25 24
Output
Enter the length of three sides. 7 25 24 It's a right triangle
Side 3 test
Input
5 12 13
Output
Enter the length of three sides. 5 12 13 It is a right triangle
Expected Output
It is a right angled triangle
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started