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

You have learned triangles in high school geometry. Three numbersx, y, and z for

ID: 3619110 • Letter: Y

Question

You have learned triangles in high school geometry. Three numbersx, y, and z form the 3 sides of a triangle if x > 0, y >0 andz > 0, and also x + y > z, y + z > x, and z + x > y(the triangular inequality).

(a) Write a C program that takes 3 numbers x, y, and z fromkeyboard and verify if they form a triangle.
(b) A rectangle triangle is a triangle where the square of one sideis equal to the sum of the squares of the other two sides. Forexample, (3, 4, 5) form a triangle since 32 + 42 = 52. Note that(4, 5, 3) a different ordering of these three numbers also form arectangle triangle. Enhance your program to recognize rectangletriangle.
(c) An obtuse triangle is a triangle where the square of one sideis bigger than the sum of squares of the other two sides. (3, 6, 4)is an obtuse triangle since 62 = 36 > 32 + 42 = 25. Note that(3, 4, 7) is not an obtuse triangle even if 72 = 49 > 32 + 42 =25; the reason being that 3 + 4 = 7 and the triangular inequalitydoes not hold. Enhance your program to recognize obtusetriangles.
(d) An acute triangle is a triangle which is neither rectangletriangle nor obtuse triangle. Enhance your program to recognizeacute triangles
(e) An isoceles triangle is a triangle with two equal sides such asx = y, y = z or z = x. An equilateral triangle is a triangle withall three sides equal. Note (2 ,2, 3) is isosceles but notequilateral, while (1, 1, 1) is equilateral. Is (1, 1, 2) anisosceles triangle which is not equilateral, why? Enhance yourprogram to recognize isoceles and equilateral triangles.
(f) An angle of a triangle can be computed using law of cosines:cos (A) = (b2 + c2 – a2) / (2bc) (did you remember thisformula from trigonometry?). Enhance your program to compute thethree angels of a triangle.
(g) Test your program with these data: T1 = (1 0 1), T2 = (2 2 2),T3 = (6 10 8 ), T4 = (6 7 8 ), T5 = (2 2 3), T6 = (3 5 4), T7 = (512 13), T8 = (5 12 14). From these 8 triplets, how many arenon-triangles, how many are rectangular triangles, how many areobtuse, how many are acute, how many are isoceles, and how many areequilateral.?
(h) Compute the angles of these two triplets if they are triangles:T2 (2 2 2) and T7 (5 12 13)

Explanation / Answer

please rate - thanks #include #include #include using namespace std; bool istriangle(double,double,double); bool isRight(double , double , double ); bool isIsosceles(double , double , double ); bool isObtuse(double , double , double ); bool isEquilateral(double , double , double ); double loc(double,double,double); int main() {double a,b,c; int r=0,o=0,ac=0,i=0,e=0; double a1,a2,a3; bool rect,obt; couta; while(a>0) {coutb; coutc; rect=false; obt=false;    if(istriangle(a,b,c))       {cout
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