/*Given the legth and breadth of a rectangle,
this program calculates area, diagnol and perimeter*/
#include<iostream.h>
#include<math.h>
//Implementation of macro in calculating hypotenuce
#define hyp(x,y) sqrt((x*x)+(y*y))
int main()
{
double l; // Stores length of rectangle
double b; //Stores breadth
cout<<"Length = ";cin>>l;
cout<<"Breadth = ";cin>>b;
cout<<"Area = "<<l*b<<endl;
cout<<"Perimeter = "<<2*(l+b)<<endl;
cout<<"Diagnol length = "<<hyp(l,b)<<endl;
}