C++
Write a function float computeArea (int *v1, int *v2, int shape)that computes the area of four basic geometric entities. Thegeometric entity will be identified by the argument shape which is1 for triangle, 2 for square/rectangle and 3 for circle. Thearguments v1 and v2 are pointers to the two arguments defining theshape. For circle v1 is a pointer to the diameter of the circle, v2is null, for rectangle/square, v1 and v2 are pointers to the heightand width for triangle v1 is a pointer to the the base and v2points to the height of the triangle.
Expert Answer
An answer will
PayPal Gateway not configured
PayPal Gateway not configured