Question: This program in C 1. Create a geometry library that will calculate the area and perimeter of three shapes. The functions you should use are:

This program in C  This program in C 1. Create a geometry library that will

1. Create a geometry library that will calculate the area and perimeter of three shapes. The functions you should use are: a. float CalcAreaTriangle (float sidel, float side2, float side3) b. float CalcAreaRectangle (float length, float height) c. float CalcAreaCircle (Eloat radius) d. float CalcPerimeterTriangle(float sidel, float side2, float side3) e. float CalcPerimeterRectangle (float length, float height) f. float CalcPerimetercircle(float radius) Place these functions in a library named geom.c" meaning and create a library named "libgeom.a". Create a header file for this library named "lbgeomh" Now, create a file named "Assignment18a." that uses this library to calculate various sizes. Use the following for your main function: int main (void) t float a, b, c ar1.2; b 3.4 c#5 , 6; printf(" A triangle with sides %2.1f, %2.1f, %2.1f has ", a, b, c); printf ("an area of %3.2f ", Cal cAreaTriangle (a, b, c)); Printf ( "and a perimeter of %3.2f. ", 1cPerineterTriangle (a, b, c)); printf (" A rectangle with sides t2.1f, %2.1f has ", a, b); Printf("an area of %3.2f-, Calare aRec tangle (a, b)); printf("and a Perimeter of %3.2f. ", CalcPerimeterRectangle (a, b)); printf ("InA circle with sides $2.1f.$2.1f has "r a, b) printf ("an area of %3.2f ", CalcAreaCircle (a)); printf ("and a perimeter of 83.2f. n". calcPerimetercircle (a)) return 0 Hint: Use Heron's formula for calculating the area of the triangle. Include a printout of your geom.c file, geom.h file, Assignment 1 8a.c file and your output

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!