C Exercises: Check three sides of a triangle form a right triangle or not
Check if three sides form a right triangle
Write a C program to check whether the three given lengths (integers) of three sides of a triangle form a right triangle or not. Print "Yes" if the given sides form a right triangle otherwise print "No".
Input:
Integers separated by a single space.
1 <= length of the side <= 1,000
Sample Solution:
C Code:
Sample Output:
Input the three sides of a trainagel: 12 11 13 It is not a right angle triangle!
Flowchart:

For more Practice: Solve these Related Problems:
- Write a C program to check if three given integers satisfy the Pythagorean theorem and form a right triangle.
- Write a C program to read three side lengths and determine if they can form a right triangle using squared comparisons.
- Write a C program to implement a function that returns true if the provided sides form a right triangle.
- Write a C program to sort three side lengths and then check if the largest squared equals the sum of squares of the other two.
C programming Code Editor:
Previous: Write a C program to calculate the sum of two given integers and count the number of digits of the sum value.
Next: Write a C program which reads an integer n and find the number of combinations of a, b, c and d (0 <= a, b, c, d <= 9) where (a + b + c + d) will be equal to n.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.