Language: C++

int main(void){
    int sx,sy,tx,ty;
    cin >> sx >> sy >> tx >> ty;
  	const int dx=tx-sx,dy=ty-sy; // Path 1
	cout << string(dy,’U’) << string(dx,’R’); // Path 2
	cout << string(dy,’D’) << string(dx,’L’); // Path 3
	cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’; // Path 4
	cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
	// EndLine
	cout << endl;
	return 0;
}

Compiler output:
a.cc:5:27: error: extended character ’ is not valid in an identifier
    5 |         cout << string(dy,’U’) << string(dx,’R’); // Path 2
      |                           ^
a.cc:5:27: error: extended character ’ is not valid in an identifier
a.cc:5:45: error: extended character ’ is not valid in an identifier
    5 |         cout << string(dy,’U’) << string(dx,’R’); // Path 2
      |                                             ^
a.cc:5:45: error: extended character ’ is not valid in an identifier
a.cc:6:27: error: extended character ’ is not valid in an identifier
    6 |         cout << string(dy,’D’) << string(dx,’L’); // Path 3
      |                           ^
a.cc:6:27: error: extended character ’ is not valid in an identifier
a.cc:6:45: error: extended character ’ is not valid in an identifier
    6 |         cout << string(dy,’D’) << string(dx,’L’); // Path 3
      |                                             ^
a.cc:6:45: error: extended character ’ is not valid in an identifier
a.cc:7:17: error: extended character ’ is not valid in an identifier
    7 |         cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’; // Path 4
      |                 ^
a.cc:7:17: error: extended character ’ is not valid in an identifier
a.cc:7:36: error: extended character ’ is not valid in an identifier
    7 |         cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’; // Path 4
      |                                    ^
a.cc:7:36: error: extended character ’ is not valid in an identifier
a.cc:7:56: error: extended character ’ is not valid in an identifier
    7 |         cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’; // Path 4
      |                                                        ^
a.cc:7:56: error: extended character ’ is not valid in an identifier
a.cc:7:64: error: extended character ’ is not valid in an identifier
    7 |         cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’; // Path 4
      |                                                                ^
a.cc:7:64: error: extended character ’ is not valid in an identifier
a.cc:8:17: error: extended character ’ is not valid in an identifier
    8 |         cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
      |                 ^
a.cc:8:17: error: extended character ’ is not valid in an identifier
a.cc:8:36: error: extended character ’ is not valid in an identifier
    8 |         cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
      |                                    ^
a.cc:8:36: error: extended character ’ is not valid in an identifier
a.cc:8:56: error: extended character ’ is not valid in an identifier
    8 |         cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
      |                                                        ^
a.cc:8:56: error: extended character ’ is not valid in an identifier
a.cc:8:64: error: extended character ’ is not valid in an identifier
    8 |         cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
      |                                                                ^
a.cc:8:64: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> sx >> sy >> tx >> ty;
      |     ^~~
a.cc:5:9: error: 'cout' was not declared in this scope
    5 |         cout << string(dy,’U’) << string(dx,’R’); // Path 2
      |         ^~~~
a.cc:5:27: error: '\U00002019U\U00002019' was not declared in this scope
    5 |         cout << string(dy,’U’) << string(dx,’R’); // Path 2
      |                           ^~~
a.cc:5:17: error: 'string' was not declared in this scope
    5 |         cout << string(dy,’U’) << string(dx,’R’); // Path 2
      |                 ^~~~~~
a.cc:5:45: error: '\U00002019R\U00002019' was not declared in this scope
    5 |         cout << string(dy,’U’) << string(dx,’R’); // Path 2
      |                                             ^~~
a.cc:6:27: error: '\U00002019D\U00002019' was not declared in this scope
    6 |         cout << string(dy,’D’) << string(dx,’L’); // Path 3
      |                           ^~~
a.cc:6:45: error: '\U00002019L\U00002019' was not declared in this scope
    6 |         cout << string(dy,’D’) << string(dx,’L’); // Path 3
      |                                             ^~~
a.cc:10:17: error: 'endl' was not declared in this scope
   10 |         cout << endl;
      |                 ^~~~