Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include"Poly.h"
- #include<iostream>
- using namespace std;
- int main()
- {
- int coeff1[] = { 4, -6, 7, 2}; //stored backwards
- Poly p1(coeff1, 3);
- int coeff2[] = {3, -3, 4};
- Poly p2(coeff2, 2);
- Poly sum = p1 + p2;
- cout << sum << endl;
- Poly difference = p1 - p2;
- cout << difference << endl;
- Poly product = p1 * p2;
- cout << product << endl;
- Poly equals = p1 = p2;
- cout << equals << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement