Advertisement
Guest User

Missing Vertex in Parallelogram

a guest
Dec 12th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main ()
  5. {
  6. int x[4], y[4];
  7. for (int i = 0; i < 3; i++)
  8. cin >> x[i] >> y[i];
  9.  
  10. int a = abs(y[0]-y[1]);
  11. int b = abs(x[1]-x[0]);
  12.  
  13. cout << x[2]-b << " " << y[2]-a << endl;
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement