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; Triangle(double x,double y,double z):a(x),b(y),c(z){}
  10. double perim(){ return a+b+c; } // Завдання 3: метод пошуку периметра
  11. void print(){ std::cout<<"a="<<a<<" b="<<b<<" c="<<c<<std::endl; }
  12. void print(char ch){ std::cout<<"a="<<a<<ch<<" b="<<b<<ch<<" c="<<c<<std::endl; }
  13.  
  14. };
  15.  
  16. int main() {
  17. Triangle t1;
  18. // your code goes here
  19. return 0;
  20. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty