Tiger6117

Area and Perimeter of the Rectangle

Dec 2nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. // Screen Shot : https://goo.gl/Q9BRqH
  2. // tigerzplace.com
  3. #include<iostream>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8.  
  9. {
  10.  
  11.     float width,height,area,perimeter;
  12.  
  13.     cout<<"Enter  Width of Rectangle = ";
  14.  
  15.     cin>>width;
  16.  
  17.     cout<<"Enter  Height of Rectangle = ";
  18.  
  19.     cin>>height;
  20.  
  21.     area=height*width;
  22.  
  23.     cout<<"Area of Rectangle ="<<area<<endl;
  24.  
  25.     perimeter=2*(height+width);
  26.  
  27. cout<<" Perimeter of rectangle are = "<<perimeter<<endl;
  28.  
  29. return 0;
  30.  
  31. }
Add Comment
Please, Sign In to add comment