Here's a program with an overloaded function calc_area() that calculates and returns the area of a circle and rectangle. The program assumes a radius and length/width are given as arguments for the circle and rectangle, respectively. The return type for both function is a "double".#include <iostream>using namespace std;const double PI= 3.14;double calc_area(double radius) { return PI*radius*radius;}double calc_area(double length, double...
Showing posts with label overloaded function calc_area(). Show all posts
Showing posts with label overloaded function calc_area(). Show all posts