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:10:20: error: extended character ’ is not valid in an identifier
   10 |  cout << string(dy,’U’) << string(dx,’R’);
      |                    ^
a.cc:10:20: error: extended character ’ is not valid in an identifier
a.cc:10:38: error: extended character ’ is not valid in an identifier
   10 |  cout << string(dy,’U’) << string(dx,’R’);
      |                                      ^
a.cc:10:38: error: extended character ’ is not valid in an identifier
a.cc:13:20: error: extended character ’ is not valid in an identifier
   13 |  cout << string(dy,’D’) << string(dx,’L’);
      |                    ^
a.cc:13:20: error: extended character ’ is not valid in an identifier
a.cc:13:38: error: extended character ’ is not valid in an identifier
   13 |  cout << string(dy,’D’) << string(dx,’L’);
      |                                      ^
a.cc:13:38: error: extended character ’ is not valid in an identifier
a.cc:16:10: error: extended character ’ is not valid in an identifier
   16 |  cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’;
      |          ^
a.cc:16:10: error: extended character ’ is not valid in an identifier
a.cc:16:29: error: extended character ’ is not valid in an identifier
   16 |  cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’;
      |                             ^
a.cc:16:29: error: extended character ’ is not valid in an identifier
a.cc:16:49: error: extended character ’ is not valid in an identifier
   16 |  cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’;
      |                                                 ^
a.cc:16:49: error: extended character ’ is not valid in an identifier
a.cc:16:57: error: extended character ’ is not valid in an identifier
   16 |  cout << ’L’ << string(dy+1,’U’) << string(dx+1,’R’) << ’D’;
      |                                                         ^
a.cc:16:57: error: extended character ’ is not valid in an identifier
a.cc:19:10: error: extended character ’ is not valid in an identifier
   19 |  cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
      |          ^
a.cc:19:10: error: extended character ’ is not valid in an identifier
a.cc:19:29: error: extended character ’ is not valid in an identifier
   19 |  cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
      |                             ^
a.cc:19:29: error: extended character ’ is not valid in an identifier
a.cc:19:49: error: extended character ’ is not valid in an identifier
   19 |  cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
      |                                                 ^
a.cc:19:49: error: extended character ’ is not valid in an identifier
a.cc:19:57: error: extended character ’ is not valid in an identifier
   19 |  cout << ’R’ << string(dy+1,’D’) << string(dx+1,’L’) << ’U’;
      |                                                         ^
a.cc:19:57: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:10:20: error: '\U00002019U\U00002019' was not declared in this scope
   10 |  cout << string(dy,’U’) << string(dx,’R’);
      |                    ^~~
a.cc:10:38: error: '\U00002019R\U00002019' was not declared in this scope
   10 |  cout << string(dy,’U’) << string(dx,’R’);
      |                                      ^~~
a.cc:13:20: error: '\U00002019D\U00002019' was not declared in this scope
   13 |  cout << string(dy,’D’) << string(dx,’L’);
      |                    ^~~
a.cc:13:38: error: '\U00002019L\U00002019' was not declared in this scope
   13 |  cout << string(dy,’D’) << string(dx,’L’);
      |                                      ^~~