How tofind the area and perimeter of a rectangle in C++
Zaarm Tech Selected answer as best November 20, 2021
#include<iostream.h>
#include<conio.h>
void main()
{
int length, width;
int perimeter, area;
clrscr();
cout<< "Length = ";
cin>> length;
cout<< "Width = ";
cin>> width;
perimeter = 2*(length+width);
area = length*width;
cout<<endl<< "Perimeter is "<<perimeter;
cout<<endl<< "Area is "<<area;
getch();
}
Zaarm Tech Selected answer as best November 20, 2021