Language: C++

using System;
using System.Diagnostics;
using System.Linq;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] x = new int[5] { 1, 2, 3, 4, 5 };
            int[] n = new int[5];
            n = Console.ReadLine().Split(" ").Select(s => int.Parse(s)).ToArray();
            foreach (var i in n)
            {
                if( i!=0 )
                x[i - 1] = 0;
            }
            Console.WriteLine(x.Sum());
        }
    }
}


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.Diagnostics;
      |       ^~~~~~
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:21:6: error: expected ';' after class definition
   21 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ConsoleApp1::Program::Main(int*)':
a.cc:11:16: error: structured binding declaration cannot have type 'int'
   11 |             int[] x = new int[5] { 1, 2, 3, 4, 5 };
      |                ^~
a.cc:11:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:11:16: error: empty structured binding declaration
a.cc:11:19: error: expected initializer before 'x'
   11 |             int[] x = new int[5] { 1, 2, 3, 4, 5 };
      |                   ^
a.cc:12:16: error: structured binding declaration cannot have type 'int'
   12 |             int[] n = new int[5];
      |                ^~
a.cc:12:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:12:16: error: empty structured binding declaration
a.cc:12:19: error: expected initializer before 'n'
   12 |             int[] n = new int[5];
      |                   ^
a.cc:13:13: error: 'n' was not declared in this scope
   13 |             n = Console.ReadLine().Split(" ").Select(s => int.Parse(s)).ToArray();
      |             ^
a.cc:13:17: error: 'Console' was not declared in this scope
   13 |             n = Console.ReadLine().Split(" ").Select(s => int.Parse(s)).ToArray();
      |                 ^~~~~~~
a.cc:13:54: error: 's' was not declared in this scope
   13 |             n = Console.ReadLine().Split(" ").Select(s => int.Parse(s)).ToArray();
      |                                                      ^
a.cc:13:57: error: expected primary-expression before '>' token
   13 |             n = Console.ReadLine().Split(" ").Select(s => int.Parse(s)).ToArray();
      |                                                         ^
a.cc:13:59: error: expected primary-expression before 'int'
   13 |             n = Console.ReadLine().Split(" ").Select(s => int.Parse(s)).ToArray();
      |                                                           ^~~
a.cc:14:22: error: 'var' was not declared in this scope
   14 |             foreach (var i in n)
      |                      ^~~
a.cc:14:13: error: 'foreach' was not declared in this scope
   14 |             foreach (var i in n)
      |             ^~~~~~~
a.cc:19:31: error: 'x' was not declared in this scope
   19 |             Console.WriteLine(x.Sum());
      |                               ^