Question: I need a solution that only uses selection statements, basic math.h operations, and has everything in separate user-defined functions. The things to AVOID using are

 I need a solution that only uses selection statements, basic math.h

operations, and has everything in separate user-defined functions. The things to AVOID

I need a solution that only uses selection statements, basic math.h operations, and has everything in separate user-defined functions. The things to AVOID using are loops, arrays, and strings. The things allowed in the code are switch and if/else. The only thing that is allowed in the main function are variable declarations and function calls. Please give the solution in C.

Problem: Given three points (A, B, C) that will always create a triangle with a positive area, calculate the location of the orthocenter and create a triangle that connects the orthocenter to the end points of the largest side in the triangle ABC. Display the internal angles of this new triangle and display whether it is isosceles, scalene, or equilateral, and whether it is acute, obtuse, or right. How to determine whether two floating-point values are equal? The comparison two floating-point values for an EXACT match is prone error, for this assignment if the absolute value of the difference between two floating-point values is less than 0.001 then the values will be considered equivalent. Example Execution #1: Enter point #1 -> 1 1 Enter point #2 -> 5 2 Enter point #3 -> 3 4 Coordinates of orthocenter: 3.20, 3.20 Internal triangle angles: 31.0, 47.7, 101.3 Triangle Type: Scalene obtuse Example Execution #2: Enter point #1 -> 3 3 Enter point #2 -> -4 -1 Enter point #3 -> 3 5 Coordinates of orthocenter: 6.43, -1.00 Internal triangle angles: 60.3, 40.6, 79.1 Triangle Type: Scalene acute Example Execution #3: Enter point #1 -> 3 1 Enter point #2 -> -3 1 Enter point #3 -> 04 Coordinates of orthocenter: 0.00, 4.00 Internal triangle angles: 45.0, 45.0, 90.0 Triangle Type: Isosceles right Example Execution #4 (rounding to one decimal place may result in angles that do not add up to exactly 180): Enter point #1 -> 3 2 Enter point #2 -> -3 2 Enter point #3 -> O 3 Coordinates of orthocenter: 0.00, 11.00 Internal triangle angles: 71.6, 71.6, 36.9 Triangle Type: Isosceles acute Example Execution #5: Enter point #1 -> -5 0 Enter point #2 -> -2 4 Enter point #3 -> 10 Coordinates of orthocenter: -2.00, 2.25 Internal triangle angles: 36.9, 106.3, 36.9 Triangle Type: Isosceles obtuse Example Execution #6: Enter point #1 -> 0 1.7320508 Enter point #2 -> -30 Enter point #3 -> 30 Coordinates of orthocenter: 0.00, 5.20 Internal triangle angles: 60.0, 60.0, 60.0 Triangle Type: Equilateral acute Problem: Given three points (A, B, C) that will always create a triangle with a positive area, calculate the location of the orthocenter and create a triangle that connects the orthocenter to the end points of the largest side in the triangle ABC. Display the internal angles of this new triangle and display whether it is isosceles, scalene, or equilateral, and whether it is acute, obtuse, or right. How to determine whether two floating-point values are equal? The comparison two floating-point values for an EXACT match is prone error, for this assignment if the absolute value of the difference between two floating-point values is less than 0.001 then the values will be considered equivalent. Example Execution #1: Enter point #1 -> 1 1 Enter point #2 -> 5 2 Enter point #3 -> 3 4 Coordinates of orthocenter: 3.20, 3.20 Internal triangle angles: 31.0, 47.7, 101.3 Triangle Type: Scalene obtuse Example Execution #2: Enter point #1 -> 3 3 Enter point #2 -> -4 -1 Enter point #3 -> 3 5 Coordinates of orthocenter: 6.43, -1.00 Internal triangle angles: 60.3, 40.6, 79.1 Triangle Type: Scalene acute Example Execution #3: Enter point #1 -> 3 1 Enter point #2 -> -3 1 Enter point #3 -> 04 Coordinates of orthocenter: 0.00, 4.00 Internal triangle angles: 45.0, 45.0, 90.0 Triangle Type: Isosceles right Example Execution #4 (rounding to one decimal place may result in angles that do not add up to exactly 180): Enter point #1 -> 3 2 Enter point #2 -> -3 2 Enter point #3 -> O 3 Coordinates of orthocenter: 0.00, 11.00 Internal triangle angles: 71.6, 71.6, 36.9 Triangle Type: Isosceles acute Example Execution #5: Enter point #1 -> -5 0 Enter point #2 -> -2 4 Enter point #3 -> 10 Coordinates of orthocenter: -2.00, 2.25 Internal triangle angles: 36.9, 106.3, 36.9 Triangle Type: Isosceles obtuse Example Execution #6: Enter point #1 -> 0 1.7320508 Enter point #2 -> -30 Enter point #3 -> 30 Coordinates of orthocenter: 0.00, 5.20 Internal triangle angles: 60.0, 60.0, 60.0 Triangle Type: Equilateral acute

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!