Language: C++

using System;
using System.Collections.Generic;
using System.Linq;

namespace ABC093_B
{
    class Program
    {
        static void Main(string[] args)
        {
            var num = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
            var A = num[0];
            var B = num[1];
            var X = num[2];
            var number = new List<int>();
            var ans = new List<int>();

            for (var i = A; i <= B; i++)
            {
                number.Add(i);
            }

            if (X > B - A + 1)
            {
                foreach (var ch in number)
                {
                    Console.WriteLine(number);
                }
                return;
            }

            for (var i = 0; i < X; i++)
            {
                ans.Add(number[i]);
            }

            for (var i = number.Count  - X; i < number.Count ; i++)
            {
                ans.Add(number[i]);
            }

            ans.Distinct();

            foreach(var ch in ans)
            {
                Console.WriteLine(ch);
            }
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:9:26: error: 'string' has not been declared
    9 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:9:35: error: expected ',' or '...' before 'args'
    9 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:49:6: error: expected ';' after class definition
   49 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ABC093_B::Program::Main(int*)':
a.cc:11:13: error: 'var' was not declared in this scope
   11 |             var num = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
      |             ^~~
a.cc:12:17: error: expected ';' before 'A'
   12 |             var A = num[0];
      |                 ^
a.cc:13:17: error: expected ';' before 'B'
   13 |             var B = num[1];
      |                 ^
a.cc:14:17: error: expected ';' before 'X'
   14 |             var X = num[2];
      |                 ^
a.cc:15:17: error: expected ';' before 'number'
   15 |             var number = new List<int>();
      |                 ^~~~~~
a.cc:16:17: error: expected ';' before 'ans'
   16 |             var ans = new List<int>();
      |                 ^~~
a.cc:18:22: error: expected ';' before 'i'
   18 |             for (var i = A; i <= B; i++)
      |                      ^
a.cc:18:29: error: 'i' was not declared in this scope
   18 |             for (var i = A; i <= B; i++)
      |                             ^
a.cc:18:34: error: 'B' was not declared in this scope
   18 |             for (var i = A; i <= B; i++)
      |                                  ^
a.cc:20:17: error: 'number' was not declared in this scope
   20 |                 number.Add(i);
      |                 ^~~~~~
a.cc:23:17: error: 'X' was not declared in this scope
   23 |             if (X > B - A + 1)
      |                 ^
a.cc:23:21: error: 'B' was not declared in this scope
   23 |             if (X > B - A + 1)
      |                     ^
a.cc:23:25: error: 'A' was not declared in this scope
   23 |             if (X > B - A + 1)
      |                         ^
a.cc:25:30: error: expected ')' before 'ch'
   25 |                 foreach (var ch in number)
      |                              ^~
a.cc:25:25: note: to match this '('
   25 |                 foreach (var ch in number)
      |                         ^
a.cc:25:17: error: 'foreach' was not declared in this scope
   25 |                 foreach (var ch in number)
      |                 ^~~~~~~
a.cc:32:22: error: expected ';' before 'i'
   32 |             for (var i = 0; i < X; i++)
      |                      ^
a.cc:32:29: error: 'i' was not declared in this scope
   32 |             for (var i = 0; i < X; i++)
      |                             ^
a.cc:32:33: error: 'X' was not declared in this scope
   32 |             for (var i = 0; i < X; i++)
      |                                 ^
a.cc:34:17: error: 'ans' was not declared in this scope
   34 |                 ans.Add(number[i]);
      |                 ^~~
a.cc:34:25: error: 'number' was not declared in this scope
   34 |                 ans.Add(number[i]);
      |                         ^~~~~~
a.cc:37:22: error: expected ';' before 'i'
   37 |             for (var i = number.Count  - X; i < number.Count ; i++)
      |                      ^
a.cc:37:45: error: 'i' was not declared in this scope
   37 |             for (var i = number.Count  - X; i < number.Count ; i++)
      |                                             ^
a.cc:37:49: error: 'number' was not declared in this scope
   37 |             for (var i = number.Count  - X; i < number.Count ; i++)
      |                                                 ^~~~~~
a.cc:39:17: error: 'ans' was not declared in this scope
   39 |                 ans.Add(number[i]);
      |                 ^~~
a.cc:42:13: error: 'ans' was not declared in this scope
   42 |             ans.Distinct();
      |             ^~~
a.cc:44:25: error: expected ')' before 'ch'
   44 |             foreach(var ch in ans)
      |                         ^~
a.cc:44:20: note: to match this '('
   44 |             foreach(var ch in ans)
      |                    ^
a.cc:44:13: error: 'foreach' was not declared in this scope
   44 |             foreach(var ch in ans)
      |             ^~~~~~~