Language: C++

#include <bits/stdc++.h>
using namespace std;
 
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:11:19: error: extended character ’ is not valid in an identifier
   11 | cout << string(dy,’U’) << string(dx,’R’);
      |                   ^
a.cc:11:19: error: extended character ’ is not valid in an identifier
a.cc:11:37: error: extended character ’ is not valid in an identifier
   11 | cout << string(dy,’U’) << string(dx,’R’);
      |                                     ^
a.cc:11:37: error: extended character ’ is not valid in an identifier
a.cc:14:19: error: extended character ’ is not valid in an identifier
   14 | cout << string(dy,’D’) << string(dx,’L’);
      |                   ^
a.cc:14:19: error: extended character ’ is not valid in an identifier
a.cc:14:37: error: extended character ’ is not valid in an identifier
   14 | cout << string(dy,’D’) << string(dx,’L’);
      |                                     ^
a.cc:14:37: error: extended character ’ is not valid in an identifier
a.cc:17:9: error: extended character ’ is not valid in an identifier
   17 | cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’;
      |         ^
a.cc:17:9: error: extended character ’ is not valid in an identifier
a.cc:17:28: error: extended character ’ is not valid in an identifier
   17 | cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’;
      |                            ^
a.cc:17:28: error: extended character ’ is not valid in an identifier
a.cc:17:48: error: extended character ’ is not valid in an identifier
   17 | cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’;
      |                                                ^
a.cc:17:48: error: extended character ’ is not valid in an identifier
a.cc:17:56: error: extended character ’ is not valid in an identifier
   17 | cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’;
      |                                                        ^
a.cc:17:56: error: extended character ’ is not valid in an identifier
a.cc:20:9: error: extended character ’ is not valid in an identifier
   20 | cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
      |         ^
a.cc:20:9: error: extended character ’ is not valid in an identifier
a.cc:20:28: error: extended character ’ is not valid in an identifier
   20 | cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
      |                            ^
a.cc:20:28: error: extended character ’ is not valid in an identifier
a.cc:20:48: error: extended character ’ is not valid in an identifier
   20 | cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
      |                                                ^
a.cc:20:48: error: extended character ’ is not valid in an identifier
a.cc:20:56: error: extended character ’ is not valid in an identifier
   20 | cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
      |                                                        ^
a.cc:20:56: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:11:19: error: '\U00002019U\U00002019' was not declared in this scope
   11 | cout << string(dy,’U’) << string(dx,’R’);
      |                   ^~~
a.cc:11:37: error: '\U00002019R\U00002019' was not declared in this scope
   11 | cout << string(dy,’U’) << string(dx,’R’);
      |                                     ^~~
a.cc:14:19: error: '\U00002019D\U00002019' was not declared in this scope
   14 | cout << string(dy,’D’) << string(dx,’L’);
      |                   ^~~
a.cc:14:37: error: '\U00002019L\U00002019' was not declared in this scope
   14 | cout << string(dy,’D’) << string(dx,’L’);
      |                                     ^~~