Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int sx, sy, tx, ty;
  cin>>sx>>sy>>tx>>ty;
  int x=tx-sx, y=ty-sy;
  for(int i=0, i<x, i++) {
    cout<<"U";
  }
  for(int i=0, i<y, i++) {
    cout<<"R";
  }
  for(int i=0, i<x, i++) {
    cout<<"D";
  }
  for(int i=0, i<=y, i++) {
    cout<<"L";
  }
  for(int i=0, i<=x, i++) {
    cout<<"U";
  }
  for(int i=0, i<=y, i++) {
    cout<<"R";
  }
  cout<<"D";
  cout<<"R";
  for(int i=0, i<=x, i++) {
    cout<<"D";
  }
  for(int i=0, i<=y, i++) {
    cout<<"L";
  }
  cout<<"U";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before '<' token
    8 |   for(int i=0, i<x, i++) {
      |                 ^
      |                 ;
a.cc:8:17: error: expected primary-expression before '<' token
a.cc:8:24: error: expected ';' before ')' token
    8 |   for(int i=0, i<x, i++) {
      |                        ^
      |                        ;
a.cc:11:17: error: expected ';' before '<' token
   11 |   for(int i=0, i<y, i++) {
      |                 ^
      |                 ;
a.cc:11:17: error: expected primary-expression before '<' token
a.cc:11:24: error: expected ';' before ')' token
   11 |   for(int i=0, i<y, i++) {
      |                        ^
      |                        ;
a.cc:14:17: error: expected ';' before '<' token
   14 |   for(int i=0, i<x, i++) {
      |                 ^
      |                 ;
a.cc:14:17: error: expected primary-expression before '<' token
a.cc:14:24: error: expected ';' before ')' token
   14 |   for(int i=0, i<x, i++) {
      |                        ^
      |                        ;
a.cc:17:17: error: expected ';' before '<=' token
   17 |   for(int i=0, i<=y, i++) {
      |                 ^~
      |                 ;
a.cc:17:17: error: expected primary-expression before '<=' token
   17 |   for(int i=0, i<=y, i++) {
      |                 ^~
a.cc:17:25: error: expected ';' before ')' token
   17 |   for(int i=0, i<=y, i++) {
      |                         ^
      |                         ;
a.cc:20:17: error: expected ';' before '<=' token
   20 |   for(int i=0, i<=x, i++) {
      |                 ^~
      |                 ;
a.cc:20:17: error: expected primary-expression before '<=' token
   20 |   for(int i=0, i<=x, i++) {
      |                 ^~
a.cc:20:25: error: expected ';' before ')' token
   20 |   for(int i=0, i<=x, i++) {
      |                         ^
      |                         ;
a.cc:23:17: error: expected ';' before '<=' token
   23 |   for(int i=0, i<=y, i++) {
      |                 ^~
      |                 ;
a.cc:23:17: error: expected primary-expression before '<=' token
   23 |   for(int i=0, i<=y, i++) {
      |                 ^~
a.cc:23:25: error: expected ';' before ')' token
   23 |   for(int i=0, i<=y, i++) {
      |                         ^
      |                         ;
a.cc:28:17: error: expected ';' before '<=' token
   28 |   for(int i=0, i<=x, i++) {
      |                 ^~
      |                 ;
a.cc:28:17: error: expected primary-expression before '<=' token
   28 |   for(int i=0, i<=x, i++) {
      |                 ^~
a.cc:28:25: error: expected ';' before ')' token
   28 |   for(int i=0, i<=x, i++) {
      |                         ^
      |                         ;
a.cc:31:17: error: expected ';' before '<=' token
   31 |   for(int i=0, i<=y, i++) {
      |                 ^~
      |                 ;
a.cc:31:17: error: expected primary-expression before '<=' token
   31 |   for(int i=0, i<=y, i++) {
      |                 ^~
a.cc:31:25: error: expected ';' before ')' token
   31 |   for(int i=0, i<=y, i++) {
      |                         ^
      |                         ;