Advertisement
Guest User

Untitled

a guest
Dec 1st, 2015
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. class Rectangle
  2. {
  3. public:
  4.  
  5. void Display()
  6. {
  7. cout << width << ' ' << height << '\n';
  8. }
  9.  
  10. protected:
  11.  
  12. unsigned int width;
  13. unsigned int height;
  14. };
  15.  
  16. class RectangleArea: public Rectangle
  17. {
  18. public:
  19.  
  20. void Input()
  21. {
  22. cin >> width >> height;
  23. }
  24.  
  25. void Display()
  26. {
  27. cout << width * height << '\n';
  28. }
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement