Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. class Figure
  2. {
  3. private:
  4. int a, b, c, p;
  5. public:
  6. void SetSideA(int a)
  7. {
  8. this->a = a;
  9. }
  10. void SetSideB(int b)
  11. {
  12. this->b = b;
  13. }
  14. void SetSideC(int c)
  15. {
  16. this->c = c;
  17. }
  18. int Perimeter()
  19. {
  20. p = a + b + c;
  21. return p;
  22. }
  23. string GetInfo()
  24. {
  25. return "The sum of the three sides is " + Perimeter();
  26. }
  27. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement