Question: All in C language A triangle is a polygon with three edges and three vertices and it is one of the basic shapes in geometry.

All in C language
A triangle is a polygon with three edges and three vertices and it is one of the basic shapes in geometry. A triangle with vertices A, B, and C is denoted as ABC (Figure 2). Write a function with the name area, which takes as arguments the Cartesian coordinates of the three vertices A(T1,y), B(T2, y2) and C(-13, ys) and it returns the area of the triangle by using the Heron's formula: a+b+c A=VT.(T-a).(T-b)-(-c), 7= where a, b and care the lengths of the vertices BC, AC and AB accordingly which you can calculate by calling the function length from Exercise 1. 2 11 CO 11 ta H TH 1 Figure 2: A triangle ABC with vertices A, B, and C You should call the function area from a main program which will ask from the user to enter the coordinates 21,41, 12, 12, 13, y3 and call the function area with these values as arguments. The function must return the area of the triangle. The program should be continuous until the area is 0. To 2+1 = Exercise 3 - Calculation of the square root of a number The square root of a real number r >0 with relative precision e > 0 can be calculated with the following recursive process (Newton's method): 2 - ] (en+ In - In il (im+). until Write a function with the name mysqrt that takes as arguments two real numbers T and e and calculates the square root according to the aforementioned process. Use the function mysqrt in a program where the user is asked to provide a positive real number and the program prints the square root of this number with relative precision 10-6. The program should be continuous until the user enters a negative number. Note: In order to calculate the square root, you will need to use the fabs function that calculates the absolute value of a real number and which is declared in
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
