//Perimeter of Rectangle 2 × (length + width)
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
double perimeter,length,width;
cout<<"Enter Length = ";
cin>>length;
cout<<"Enter Width = ";
cin>>width;
perimeter=2*(length +width);
cout<<"Perimeter of Rectangle = "<<perimeter;
getch();
}
0 Questions:
Post a Comment