Language: C++

using System;

// ガウス・ジョルダン法
// https://www.mk-mode.com/blog/2013/09/20/cpp-simultaneous-equation-by-gauss-jorden/#

namespace Prob0004
{
    class Program
    {
        static void Main(string[] args)
        {

            const int COLUMN = 2;
            const int ROW = 3;

            string line;
            while((line = Console.ReadLine()) != null)
            {
                // a[0][0]x + a[0][1]y = a[0][2]
                // a[1][0]x + a[1][1]y = a[1][2]
                string[] tokens = line.Split(' ');
                double[,] a = new double[COLUMN, ROW];
                for(int y = 0; y < COLUMN; y++)
                {
                    for (int x = 0; x < ROW; x++)
                    {
                        a[y, x] = double.Parse(tokens[y * ROW + x]);
                    }
                }


                for(int y = 0; y < COLUMN; y++)
                {
                    for (int x = 0; x < ROW; x++)
                    {
                        Console.Write("{0} ", a[y, x]);
                    }
                    Console.WriteLine("");
                }


                // pivot = (p, p)
                double coef;
                for (int p = 0; p < ROW - 1; p++)
                {

                    // ピボットのある行要素への処理
                    coef = a[p, p];
                    for (int x = p; x < ROW; x++)
                    { 
                        a[p, x] /= coef;
                    }

                    // ピボット以外の行要素への処理
                    for (int y = 0; y < COLUMN; y++)
                    {
                        if(p == y)
                        {
                            continue;
                        }

                        coef = a[y, p];
                        for (int x = p; x < ROW; x++)
                        {
                            a[y, x] -= a[p, x] * coef;
                        }
                    }

                    /*
                                        Console.WriteLine("");
                                        for (int y = 0; y < COLUMN; y++)
                                        {
                                            for (int x = 0; x < ROW; x++)
                                            {
                                                Console.Write("{0} ", a[y, x]);
                                            }
                                            Console.WriteLine("");
                                        }
                                        Console.WriteLine("");
                    */
                }

                // outputs
                for (int y = 0; y < COLUMN; y++)
                {
                    Console.Write("{0} ", a[y, ROW - 1].ToString("F3"));
                }
                Console.WriteLine();
            }

        }



    }
}



Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:10:26: error: 'string' has not been declared
   10 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:10:35: error: expected ',' or '...' before 'args'
   10 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:95:6: error: expected ';' after class definition
   95 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void Prob0004::Program::Main(int*)':
a.cc:16:13: error: 'string' was not declared in this scope
   16 |             string line;
      |             ^~~~~~
a.cc:17:20: error: 'line' was not declared in this scope
   17 |             while((line = Console.ReadLine()) != null)
      |                    ^~~~
a.cc:17:27: error: 'Console' was not declared in this scope
   17 |             while((line = Console.ReadLine()) != null)
      |                           ^~~~~~~
a.cc:17:50: error: 'null' was not declared in this scope
   17 |             while((line = Console.ReadLine()) != null)
      |                                                  ^~~~
a.cc:21:24: error: expected primary-expression before ']' token
   21 |                 string[] tokens = line.Split(' ');
      |                        ^
a.cc:22:24: error: expected identifier before ',' token
   22 |                 double[,] a = new double[COLUMN, ROW];
      |                        ^
a.cc:22:24: error: expected ']' before ',' token
a.cc:22:23: error: structured binding declaration cannot have type 'double'
   22 |                 double[,] a = new double[COLUMN, ROW];
      |                       ^
a.cc:22:23: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:22:23: error: empty structured binding declaration
a.cc:22:27: error: expected initializer before 'a'
   22 |                 double[,] a = new double[COLUMN, ROW];
      |                           ^
a.cc:27:25: error: 'a' was not declared in this scope
   27 |                         a[y, x] = double.Parse(tokens[y * ROW + x]);
      |                         ^
a.cc:27:35: error: expected primary-expression before 'double'
   27 |                         a[y, x] = double.Parse(tokens[y * ROW + x]);
      |                                   ^~~~~~
a.cc:36:47: error: 'a' was not declared in this scope
   36 |                         Console.Write("{0} ", a[y, x]);
      |                                               ^
a.cc:48:28: error: 'a' was not declared in this scope
   48 |                     coef = a[p, p];
      |                            ^
a.cc:86:43: error: 'a' was not declared in this scope
   86 |                     Console.Write("{0} ", a[y, ROW - 1].ToString("F3"));
      |                                           ^