Advertisement
Guest User

Test

a guest
Mar 25th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include"Poly.h"
  2. #include<iostream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int coeff1[] = { 4, -6, 7, 2}; //stored backwards
  8. Poly p1(coeff1, 3);
  9. int coeff2[] = {3, -3, 4};
  10. Poly p2(coeff2, 2);
  11.  
  12. Poly sum = p1 + p2;
  13. cout << sum << endl;
  14.  
  15. Poly difference = p1 - p2;
  16. cout << difference << endl;
  17.  
  18. Poly product = p1 * p2;
  19. cout << product << endl;
  20.  
  21. Poly equals = p1 = p2;
  22. cout << equals << endl;
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement