Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- class monomial
- {
- double coef;
- int deg;
- public:
- monomial(double, int);
- monomial(const monomial& m) : monomial(m.coef, m.deg){}
- monomial(double x) :monomial(x, 0){}
- monomial() :monomial(0, 0){}
- ~monomial();
- void setCoef(double);
- double getCoef() const;
- void setDeg(int);
- int getDeg() const;
- friend ostream& operator<<(ostream&, const monomial&);
- };
Advertisement
Add Comment
Please, Sign In to add comment