Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OCA Oracle Database SQL Exam Guide Exam 1Z0-071

Authors: Steve O'Hearn

1st Edition

1259585492, 978-1259585494

More Books

Students also viewed these Databases questions