Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  k
Language: C/C++
Code:
#include<stdio.h>
#include<conio.h>
#include<iostream.h>
class mon
{.
int ar,pr,as,l,b,a;
public:
void read();
void display();
};
void mon::read()
{
cout<<"enter the sides of rectangle=";
cin>>l>>b;
cout<<"/n enter the sides of square=";
cin>>a;
}
void mon::display()
{
ar=l*b
pr=2*(l+b)
as=a*a
ps=4*a
cout<<"n area of rectangle="<<ar;
cout<<"n perimeter of rectangle="<<pr;
cout<<"n area of square="<<as;
cout<<"n perimeter of square+"<<ps;
}
void mon()
{
clrscr();
mon m;
m.read();
m.display();
getch();


          
          
          
Comments: