Question: 20 points) Using user defined functions and pointers, find the area and perimeter of an equilateral triangle. An equilateral triangle has three equal sides and

20 points) Using user defined functions and pointers, find the area and perimeter of an equilateral triangle. An equilateral triangle has three equal sides and three equal angles. Area of any triangle is *base*height. Perimeter of any triangle is the sum of the lengths of the three sides.

Your program must use the user defined function information and pointers as described

void triangle(double s, double *ptrA, double *ptrP);

triangle(side, &area, &perimeter);

void triangle(double s, double *ptrA, double *ptrP){

//calculations here

return;

}

Your program must print out the side entered, the area, the perimeter and the addresses of ptrA and ptrB.

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!