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

1. Write a program triangles.c that reads in the lengths of the three sides of a

ID: 3743738 • Letter: 1

Question

1. Write a program triangles.c that reads in the lengths of the three sides of a triangle. First, verify that the lengths do form a triangle: adding any two sides should yield a number that exceeds the third. Next, if it is a triangle, determine if the triangle is equilateral: all sides would have equal length; determine if the triangle is isosceles: two sides have equal length, which is different from the third. Finally, determine if the triangle is right-angled: the sum of the square of two sides would yield the square of the third. Example input/output: Enter the lengths of three sides of the triangle: 3.3 19.6 3.3 Output: The three sides do not form a triangle. Enter the lengths of three sides of the triangle: 3.3 3.3 3.3 Output: The three sides form a triangle. The triangle is equilateral Enter the lengths of three sides of the triangle: 3 4 5 Output: The three sides form a triangle. The triangle is right-angled. Enter the lengths of three sides of the triangle: 6.3 6.35 Output:_The three sides form a triangle. The triangle is isosceles

Explanation / Answer

#include int main() { float n1, n2, n3; printf("Enter the lenghts of three sides of the triangle: "); scanf("%f", &n1); scanf("%f", &n2); scanf("%f", &n3); if(n1+n2