Area and Perimeter of Rectangle



#include<iostream.h>
#include<conio.h>

void main()
{
    int p, q, area, perimeter;
    clrscr();
    cout<<"Enter two sides :";
    cin>>p>>q;

    area = p * q;

    cout<<"\nArea :"<<area;

    perimeter = 2 * (p + q);

    cout<<"\nPerimeter: "<<perimeter;
}
Previous Post Next Post