about summary refs log tree commit diff
path: root/usth/ICT2.2/labwork/3/C++/vector-test.cc
blob: 647c8a66d3ae67953fa1a9361010a86b739dcdd2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <iostream>

#include "vector.h"

using namespace std;

int
main ()
{
  Vector u (4, 20);
  Vector v (6, 9);
  cout << "u = (" << u.x << ", " << u.y << ")" << endl;
  cout << "v = (" << v.x << ", " << v.y << ")" << endl;
  Vector w {u + v};
  cout << "u + v = (" << w.x << ", " << w.y << ")" << endl;
  w = u - v;
  cout << "u - v = (" << w.x << ", " << w.y << ")" << endl;
  w = u * v;
  cout << "u * v = (" << w.x << ", " << w.y << ")" << endl;
}