CPP Triangle, Circle Rectangle Function Overloading
CPP Triangle, Circle Rectangle Function Overloading
Below is the source code for C++ program to find Area using Function Overloading
which is successfully compiled and run on Windows System to produce desired output
as shown below :
#include<iostream>
using namespace std;
int area(int,int);
float area(float);
float area(float,float);
int main()
{
int l,b;
float r,bs,ht;
}
int area(int l,int b)
{
return(l*b);
}
float area(float r)
{
return(3.14*r*r);
}
float area(float bs,float ht)
{
return((bs*ht)/2);
}