#include <iostream>
using namespace std;
int area(int);
float area(float,float);
int area(int,int);
float area(float);
int main()
{
    int s,l,b;
    float a,h,r;
    cout<<"AREA OF SHAPES"<<endl;
    cout<<"______________"<<endl;
    cout<<"Enter the value of square:"<<endl;
    cin>>s;
    cout<<"Enter the length and breadth of rectangle:"<<endl;
    cin>>l>>b;
    cout<<"Enter the radius of circle:"<<endl;
    cin>>r;
    cout<<"Enter the base and height of triangle:"<<endl;
    cin>>a>>h;
    cout<<"________________________";
    cout<<"\nArea of Square is "<<area(s)<<endl;
    cout<<"Area of Rectangle is "<<area(l,b)<<endl;
    cout<<"Area of Circle is "<<area(r)<<endl;
    cout<<"Area of Triangle is "<<area(a,h)<<endl;
    cout<<"________________________";
}
int area(int s)
{
    return(s*s);
}
int area(int l,int b)
{
    return(l*b);
}
float area(float r)
{
    return(3.14*r*r);
}
float area(float a,float h)
{
    return(0.5*a*h);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: