22.6k views
5 votes
Write a C++ program to find the area and circumference of a rectangle

User Webaware
by
6.0k points

1 Answer

5 votes

Answer:

#include <iostream>

using namespace std;

int main()

{

int width, lngth, area, peri;

cout << "\\\\ Find the Area and Perimeter of a Rectangle :\\";

cout << "-------------------------------------------------\\";

cout<<" Input the length of the rectangle : ";

cin>>lngth;

cout<<" Input the width of the rectangle : ";

cin>>width;

area=(lngth*width);

peri=2*(lngth+width);

cout<<" The area of the rectangle is : "<< area << endl;

cout<<" The perimeter of the rectangle is : "<< peri << endl;

cout << endl;

return 0;

}

Step-by-step explanation:

User Maxim Fateev
by
6.1k points