Language: C++

using System;
class Program {
	static void Main(string[] args) 
    {
        int N = int.Parse(Console.ReadLine());
        string[] TA = Console.ReadLine().Split(' ');
        int T = int.Parse(TA[0]);
        int A = int.Parse(TA[1]);
        string[] strH = Console.ReadLine().Split(' ');
        int[] H = new int[N];
        double[] aveT = new double[N];
        int ans = 0;
        double diff = 100000.0;

        for(int i = 0; i < N; i++)
        {
            H[i] = int.Parse(strH[i]);
            aveT[i] = T - H[i] * 0.006;
            if(diff > Math.Abs(A - aveT[i]))
            {
                diff = Math.Abs(A - aveT[i]);
                ans = i + 1;
            }
        }

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:3:26: error: 'string' has not been declared
    3 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:3:35: error: expected ',' or '...' before 'args'
    3 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:24:10: error: expected '}' at end of input
   24 |         }
      |          ^
a.cc:2:15: note: to match this '{'
    2 | class Program {
      |               ^
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:5:17: error: expected primary-expression before 'int'
    5 |         int N = int.Parse(Console.ReadLine());
      |                 ^~~
a.cc:6:9: error: 'string' was not declared in this scope
    6 |         string[] TA = Console.ReadLine().Split(' ');
      |         ^~~~~~
a.cc:6:16: error: expected primary-expression before ']' token
    6 |         string[] TA = Console.ReadLine().Split(' ');
      |                ^
a.cc:7:17: error: expected primary-expression before 'int'
    7 |         int T = int.Parse(TA[0]);
      |                 ^~~
a.cc:8:17: error: expected primary-expression before 'int'
    8 |         int A = int.Parse(TA[1]);
      |                 ^~~
a.cc:9:16: error: expected primary-expression before ']' token
    9 |         string[] strH = Console.ReadLine().Split(' ');
      |                ^
a.cc:10:12: error: structured binding declaration cannot have type 'int'
   10 |         int[] H = new int[N];
      |            ^~
a.cc:10:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:10:12: error: empty structured binding declaration
a.cc:10:15: error: expected initializer before 'H'
   10 |         int[] H = new int[N];
      |               ^
a.cc:11:15: error: structured binding declaration cannot have type 'double'
   11 |         double[] aveT = new double[N];
      |               ^~
a.cc:11:15: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:11:15: error: empty structured binding declaration
a.cc:11:18: error: expected initializer before 'aveT'
   11 |         double[] aveT = new double[N];
      |                  ^~~~
a.cc:17:13: error: 'H' was not declared in this scope
   17 |             H[i] = int.Parse(strH[i]);
      |             ^
a.cc:17:20: error: expected primary-expression before 'int'
   17 |             H[i] = int.Parse(strH[i]);
      |                    ^~~
a.cc:18:13: error: 'aveT' was not declared in this scope
   18 |             aveT[i] = T - H[i] * 0.006;
      |             ^~~~
a.cc:19:23: error: 'Math' was not declared in this scope
   19 |             if(diff > Math.Abs(A - aveT[i]))
      |                       ^~~~
a.cc:24:10: error: expected '}' at end of input
   24 |         }
      |          ^
a.cc:4:5: note: to match this '{'
    4 |     {
      |     ^
a.cc: At global scope:
a.cc:24:10: error: expected unqualified-id at end of input
   24 |         }
      |          ^