Language: C++

int main() {
	int x1, y1, x2, y2, x3, y3;
	cin >> x1 >> y1 >> x2 >> y2;
	int dx, dy;
	dx = abs(x2 - x1);
	dy = abs(y2 - y1);
	if (x1 < x2 && y1 < y2) {
		cout << x2 - dy << " " << y2 + dx << " " << x2 - dy - dx << " " << y2 + dx - dy << endl;
	}
	else if (x1 < x2 && y2 < y1) {
		cout << x2 + dy << " " << y2 + dx << " " << x2 + dy - dx << " " << y2 + dx + dy << endl;
	}
	else if (x2 < x1 && y1 < y2) {
		cout << x2 - dy << " " << y2 - dx << " " << x2 - dy + dx << " " << y2 - dx - dy << endl;
	}
	else if (x2 < x1 && x2 < x1) {
		cout << x2 + dy << " " << y2 - dx << " " << x2 + dy + dy << " " << y2 - dx + dy << endl;
	}
	else if (x1 == x2 && y1 < y2) {
		cout << x1 - dy << " " << y2 << " " << x1 - dy << " " << y1 << endl;
	}
	else if (x1 == x2 && y2 < y1) {
		cout << x1 + dy << " " << y2 << " " << x1 + dy << " " << y1 << endl;
	}
	else if (x1 < x2 && y1 == y2) {
		cout << x2 << " " << y1 + dx << " " << x1 << " " << y1 + dx << endl;
	}
	else if (x2 < x1 && y1 == y2) {
		cout << x2 << " " << y1 - dx << " " << x1 << " " << y1 - dx << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> x1 >> y1 >> x2 >> y2;
      |         ^~~
a.cc:5:14: error: 'abs' was not declared in this scope
    5 |         dx = abs(x2 - x1);
      |              ^~~
a.cc:8:17: error: 'cout' was not declared in this scope
    8 |                 cout << x2 - dy << " " << y2 + dx << " " << x2 - dy - dx << " " << y2 + dx - dy << endl;
      |                 ^~~~
a.cc:8:100: error: 'endl' was not declared in this scope
    8 |                 cout << x2 - dy << " " << y2 + dx << " " << x2 - dy - dx << " " << y2 + dx - dy << endl;
      |                                                                                                    ^~~~
a.cc:11:17: error: 'cout' was not declared in this scope
   11 |                 cout << x2 + dy << " " << y2 + dx << " " << x2 + dy - dx << " " << y2 + dx + dy << endl;
      |                 ^~~~
a.cc:11:100: error: 'endl' was not declared in this scope
   11 |                 cout << x2 + dy << " " << y2 + dx << " " << x2 + dy - dx << " " << y2 + dx + dy << endl;
      |                                                                                                    ^~~~
a.cc:14:17: error: 'cout' was not declared in this scope
   14 |                 cout << x2 - dy << " " << y2 - dx << " " << x2 - dy + dx << " " << y2 - dx - dy << endl;
      |                 ^~~~
a.cc:14:100: error: 'endl' was not declared in this scope
   14 |                 cout << x2 - dy << " " << y2 - dx << " " << x2 - dy + dx << " " << y2 - dx - dy << endl;
      |                                                                                                    ^~~~
a.cc:17:17: error: 'cout' was not declared in this scope
   17 |                 cout << x2 + dy << " " << y2 - dx << " " << x2 + dy + dy << " " << y2 - dx + dy << endl;
      |                 ^~~~
a.cc:17:100: error: 'endl' was not declared in this scope
   17 |                 cout << x2 + dy << " " << y2 - dx << " " << x2 + dy + dy << " " << y2 - dx + dy << endl;
      |                                                                                                    ^~~~
a.cc:20:17: error: 'cout' was not declared in this scope
   20 |                 cout << x1 - dy << " " << y2 << " " << x1 - dy << " " << y1 << endl;
      |                 ^~~~
a.cc:20:80: error: 'endl' was not declared in this scope
   20 |                 cout << x1 - dy << " " << y2 << " " << x1 - dy << " " << y1 << endl;
      |                                                                                ^~~~
a.cc:23:17: error: 'cout' was not declared in this scope
   23 |                 cout << x1 + dy << " " << y2 << " " << x1 + dy << " " << y1 << endl;
      |                 ^~~~
a.cc:23:80: error: 'endl' was not declared in this scope
   23 |                 cout << x1 + dy << " " << y2 << " " << x1 + dy << " " << y1 << endl;
      |                                                                                ^~~~
a.cc:26:17: error: 'cout' was not declared in this scope
   26 |                 cout << x2 << " " << y1 + dx << " " << x1 << " " << y1 + dx << endl;
      |                 ^~~~
a.cc:26:80: error: 'endl' was not declared in this scope
   26 |                 cout << x2 << " " << y1 + dx << " " << x1 << " " << y1 + dx << endl;
      |                                                                                ^~~~
a.cc:29:17: error: 'cout' was not declared in this scope
   29 |                 cout << x2 << " " << y1 - dx << " " << x1 << " " << y1 - dx << endl;
      |                 ^~~~
a.cc:29:80: error: 'endl' was not declared in this scope
   29 |                 cout << x2 << " " << y1 - dx << " " << x1 << " " << y1 - dx << endl;
      |                                                                                ^~~~