SHARE
TWEET

Test

a guest Mar 25th, 2019 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top