Write a program to find the Area and Perimeter of a Rectangle Hint: area=height*width Perimeter=2*(height+width) Test Case 1 Input (stdin) 20 5 Expected Output Area of Rectangle=100 Perimeter of rectangle=50 Test Case 2 Input (stdin) 80 5 Expected Output Area of Rectangle=400 Perimeter of rectangle=170
#include <iostream>
using namespace std;
int main()
{
int area,height,width,perimeter;
cin>>height>>width;
area=height*width;
perimeter=2*(height+width);
cout<<"Area of Rectangle="<<area<<"\n"<<"Perimeter of rectangle="<<perimeter;
return 0;
}