0% found this document useful (0 votes)
24 views4 pages

Assingment No.6: Find Area of Rectangle Square and Circle Using Function Overloading. Program

Uploaded by

Gaming ki Duniya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views4 pages

Assingment No.6: Find Area of Rectangle Square and Circle Using Function Overloading. Program

Uploaded by

Gaming ki Duniya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

ASSINGMENT NO.

 Find area of rectangle square and circle using function


overloading.
 program
 #include<iostream>
 using namespace std;
 int area(int);
 int area(int,int);
 float area(float);

 int main()
 {
         int s,l,b;
         float r,bs,ht;
         cout<<"FE21IF024 CHAITANYA GIRGAONKAR"<<endl;
         cout<<"Enter side of a square:";
         cin>>s;
         cout<<"Enter length and breadth of rectangle:";
         cin>>l>>b;
         cout<<"Enter radius of circle:";
         cin>>r;
         cout<<"Area of square is"<<area(s);
         cout<<"\nArea of rectangle is "<<area(l,b);
     cout<<"\nArea of circle is "<<area(r);
    
 }
 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);
 }

 OUTPUT

You might also like