Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Area of Rectangle in C++

//AREA OF THE RECTANGLE
#include<iostream.h>
#include<conio.h>
class rectangle
{
float ar;
public:
void area(float l,float b)
{
ar= l*b;
cout<<"\n The area of rectangle="<<ar;
}
};
void main()
{
rectangle r;
float len,br;
cout<<"Enter the length & breadth of rectangle:";
cin>>len>>br;
r.area(len,br);
getch();
}