Advertisement
Guest User

Untitled

a guest
Dec 14th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #include "Exception.h"
  2. #include "DinArr.h"
  3. #include "Vector.h"
  4. #include <iostream>
  5.  
  6. using namespace std;
  7.  
  8. int main() {
  9. setlocale(LC_ALL, "Russian");
  10. Vector v1(3, 1);
  11. Vector v2(3);
  12. v2[0] = 1;
  13. v2[1] = 2;
  14. v2[2] = 3;
  15.  
  16. bool rez = v1 == v2;
  17. cout <<rez << endl;
  18. v2 = v2 - v1;
  19. for (int i = 0; i < v2.getSize(); i++) {
  20. cout << v2[i] << " ";
  21. }
  22. cout << endl;
  23. v2 = v2 * 2;
  24. for (int i = 0; i < v2.getSize(); i++) {
  25. cout << v2[i] << " ";
  26. }
  27. cout << endl;
  28. cout << v2*v1 << endl;
  29. cout << compareByNorma(v1, v2) << endl;
  30. system("pause");
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement