SHARE
TWEET

Untitled

a guest May 22nd, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include "Rectangle.h"
  3. using namespace std;
  4.  
  5. int main() {
  6.     Rectangle newRectangle;
  7.  
  8.     newRectangle.setLength(5);
  9.     newRectangle.setWidth(5);
  10.  
  11.     cout << "Length = " << newRectangle.getLength() << "; Width = " << newRectangle.getWidth() << endl;
  12.  
  13.     cout << "The rectangle's perimeter: " << newRectangle.Perimeter() << endl;
  14.     cout << "The rectangle's area: " << newRectangle.Area() << endl;
  15.  
  16.     if (newRectangle.IsSquare())
  17.         cout << "This is a square." << endl;
  18.     else
  19.         cout << "This is not a square." << endl;
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top