Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include<iostream>
  2. #include<iomanip>
  3. #include<fstream>
  4. #include <vector>
  5. #include <string>
  6. using namespace std;
  7.  
  8. template <class T>
  9. class Polynom
  10. {
  11. public:
  12. int n;
  13. T *koef;
  14. Polynom();
  15. Polynom(int an);
  16. Polynom(const Polynom &);
  17. ~Polynom();
  18. int getn();
  19. double sum();
  20. double getkoef(int);
  21. Polynom operator+(const Polynom &);
  22. Polynom operator-(const Polynom &);
  23. Polynom operator*(const Polynom &);
  24. Polynom operator=(const Polynom &);
  25. void print();
  26. friend ostream &operator<<<T>(ostream &s, const Polynom &c);
  27. double &operator()(int i)
  28. {
  29. return koef[i];
  30. }
  31. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement