Here is how you define the functions. Now you just need to write the main function.
double shape_area(double a) { return a * a; }
// now that we have defined this we can't make one for:
// - a circle that takes a radius
double shape_area(double a, double b) { return a * b; }
// now that we have defined this we can't make one for:
// - a triangle that takes a base and a height
// - an ellipse that takes a major axis and a minor axis
double shape_area(double a, double b, double c) {
double s = (a + b + c) / 2.0;
return sqrt(s * (s - a) * (s - b) * (s - c));
}
// now that we have defined this we can't make one for:
// - any other calculation that takes three inputs