fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. class Triangle{
  6. protected:
  7. double a,b,c;
  8. public:
  9. static int count;
  10. Triangle(double x,double y,double z):a(x),b(y),c(z){ count++; }
  11. double perim(){ return a+b+c; } // Завдання 3: метод пошуку периметра
  12. void print(){ std::cout<<"a="<<a<<" b="<<b<<" c="<<c<<std::endl; }
  13. void print(char ch){ std::cout<<"a="<<a<<ch<<" b="<<b<<ch<<" c="<<c<<std::endl; }
  14. ~Triangle(){}
  15. };
  16.  
  17. int main() {
  18. // your code goes here
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5312KB
stdin
Standard input is empty
stdout
Standard output is empty