Language: C++

using System;



class Program
{
    static void Main(string[] args)
    {
        Input CInput = new Input();
        //EasyTask CEasyTask = new EasyTask();
        //int input = 0;
        //int[] input = new int[(int)Input.Define.MAX_ArraySize];
        //int[,] input = new int[(int)Input.Define.MAX_ArraySize, (int)Input.Define.ArraySize2d];
        //int num = 0;
        //input = CInput.Line1_int();
        //input = CInput.Multiline_int(' ', 2, ref num);


        //int[] input1 = new int[(int)Input.Define.MAX_ArraySize];
        //int[,] input2 = new int[(int)Input.Define.MAX_ArraySize, (int)Input.Define.ArraySize2d];
        //int[,] input3 = new int[(int)Input.Define.MAX_ArraySize, (int)Input.Define.ArraySize2d];
        //int input3_count = 0;

        int sum = 0;

        while (true)
        {
            var input1 = CInput.Line1_string();

            if (int.Parse(input1) == 0) break;

            for (int j = 0; j < input1.Length; j++)
            {
                sum += int.Parse(input1[j].ToString());
            }

            System.Console.WriteLine(sum);
        }
    }


}








class Input
{
    public enum Define
    {
        MAX_ArraySize = 100,
        ArraySize2d = 100,                // 2?¬?????????????[][?] ???????
    }

    public string Line1_string()
    {
        return Console.ReadLine();
    }

    public string[] Line1_string(int chr)
    {
        var input = Console.ReadLine();
        var split = input.Split(' ');
        return split;
    }

    public int Line1_int()
    {
        var input = Console.ReadLine();
        return int.Parse(input);
    }

    public double Line1_double()
    {
        var input = Console.ReadLine();
        return double.Parse(input);
    }

    public int[] Line1_int(int chr, int num)
    {
        var input = Console.ReadLine();
        var split = input.Split(' ');
        int[] spliti = new int[100];
        for (int i = 0; i < num; i++)
        {
            spliti[i] = int.Parse(split[i]);
        }
        return spliti;
    }

    public int[] Multiline_int(ref int datanum)
    {
        int i = 0;
        int[] data = new int[(int)Input.Define.MAX_ArraySize];
        while (true)
        {
            var input = Console.ReadLine();
            var value = int.Parse(input);
            if (value == 0) break;
            data[i] = value;
            i++;
        }
        datanum = i;
        return data;
    }

    /// <summary>
    /// ?????°??????int??????????????????????????????
    /// </summary>
    /// <param name="chr">???????????????</param>
    /// <param name="num">?????????????????????????????°</param>
    /// <param name="datanum">??????????????????????????°</param>
    /// <returns></returns>
    public int[,] Multiline_int(int chr, int num, ref int datanum)
    {
        int i = 0, zerocount = 0;
        int[,] data = new int[(int)Input.Define.MAX_ArraySize, (int)Input.Define.ArraySize2d];
        while (true)
        {
            var input = Console.ReadLine();
            var split = input.Split(' ');
            int[] spliti = new int[100];
            zerocount = 0;
            for (int j = 0; j < num; j++)
            {
                spliti[j] = int.Parse(split[j]);
                if (spliti[j] == 0) zerocount++;
            }
            if (zerocount == num) break;
            for (int j = 0; j < num; j++)
            {
                if (spliti[0] == 0 && spliti[1] == 0) break; // ???????????????????????????
            }
            for (int j = 0; j < num; j++)
            {
                data[i, j] = spliti[j];
            }
            i++;
        }
        datanum = i;
        return data;
    }

    /// <summary>
    /// ?????°??????int??????????????????????????????
    /// </summary>
    /// <param name="chr">???????????????</param>
    /// <param name="num">?????????????????????????????°</param>
    /// <param name="loadnum">???????????????????????°</param>
    /// <returns></returns>
    public int[,] Multiline_int(int chr, int num, int loadnum)
    {
        int i = 0;
        int[,] data = new int[(int)Input.Define.MAX_ArraySize, (int)Input.Define.ArraySize2d];
        while (true)
        {
            if (loadnum == i) break;

            var input = Console.ReadLine();
            var split = input.Split(' ');
            int[] spliti = new int[100];
            for (int j = 0; j < num; j++)
            {
                spliti[j] = int.Parse(split[j]);
            }
            for (int j = 0; j < num; j++)
            {
                data[i, j] = spliti[j];
            }
            i++;
        }
        return data;
    }


}

class EasyTask
{
    public void Swap(ref int a, ref int b)
    {
        int buf = 0;
        buf = a;
        a = b;
        b = buf;
    }






}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:7:22: error: 'string' has not been declared
    7 |     static void Main(string[] args)
      |                      ^~~~~~
a.cc:7:31: error: expected ',' or '...' before 'args'
    7 |     static void Main(string[] args)
      |                               ^~~~
a.cc:42:2: error: expected ';' after class definition
   42 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Program::Main(int*)':
a.cc:9:9: error: 'Input' was not declared in this scope
    9 |         Input CInput = new Input();
      |         ^~~~~
a.cc:28:13: error: 'var' was not declared in this scope
   28 |             var input1 = CInput.Line1_string();
      |             ^~~
a.cc:30:20: error: expected unqualified-id before '.' token
   30 |             if (int.Parse(input1) == 0) break;
      |                    ^
a.cc:32:33: error: 'input1' was not declared in this scope
   32 |             for (int j = 0; j < input1.Length; j++)
      |                                 ^~~~~~
a.cc:34:24: error: expected primary-expression before 'int'
   34 |                 sum += int.Parse(input1[j].ToString());
      |                        ^~~
a.cc:37:13: error: 'System' was not declared in this scope
   37 |             System.Console.WriteLine(sum);
      |             ^~~~~~
a.cc: At global scope:
a.cc:53:11: error: expected ':' before 'enum'
   53 |     public enum Define
      |           ^~~~~
      |           :
a.cc:59:5: error: expected unqualified-id before 'public'
   59 |     public string Line1_string()
      |     ^~~~~~
a.cc:64:11: error: expected ':' before 'string'
   64 |     public string[] Line1_string(int chr)
      |           ^~~~~~~
      |           :
a.cc:64:12: error: 'string' does not name a type
   64 |     public string[] Line1_string(int chr)
      |            ^~~~~~
a.cc:71:11: error: expected ':' before 'int'
   71 |     public int Line1_int()
      |           ^~~~
      |           :
a.cc:77:11: error: expected ':' before 'double'
   77 |     public double Line1_double()
      |           ^~~~~~~
      |           :
a.cc:83:11: error: expected ':' before 'int'
   83 |     public int[] Line1_int(int chr, int num)
      |           ^~~~
      |           :
a.cc:83:15: error: expected unqualified-id before '[' token
   83 |     public int[] Line1_int(int chr, int num)
      |               ^
a.cc:95:11: error: expected ':' before 'int'
   95 |     public int[] Multiline_int(ref int datanum)
      |           ^~~~
      |           :
a.cc:95:15: error: expected unqualified-id before '[' token
   95 |     public int[] Multiline_int(ref int datanum)
      |               ^
a.cc:118:11: error: expected ':' before 'int'
  118 |     public int[,] Multiline_int(int chr, int num, ref int datanum)
      |           ^~~~
      |           :
a.cc:118:15: error: expected unqualified-id before '[' token
  118 |     public int[,] Multiline_int(int chr, int num, ref int datanum)
      |               ^
a.cc:155:11: error: expected ':' before 'int'
  155 |     public int[,] Multiline_int(int chr, int num, int loadnum)
      |           ^~~~
      |           :
a.cc:155:15: error: expected unqualified-id before '[' token
  155 |     public int[,] Multiline_int(int chr, int num, int loadnum)
      |               ^
a.cc:180:2: error: expected ';' after class definition
  180 | }
      |  ^
      |  ;
a.cc: In member function 'int Input::Line1_int()':
a.cc:73:9: error: 'var' was not declared in this scope
   73 |         var input = Console.ReadLine();
      |         ^~~
a.cc:74:16: error: expected primary-expression before 'int'
   74 |         return int.Parse(input);
      |                ^~~
a.cc:74:16: error: expected ';' before 'int'
a.cc:74:19: error: expected unqualified-id before '.' token
   74 |         return int.Parse(input);
      |                   ^
a.cc: In member function 'double Input::Line1_double()':
a.cc:79:9: error: 'var' was not declared in this scope
   79 |         var input = Console.ReadLine();
      |         ^~~
a.cc:80:16: error: expected primary-expression before 'double'
   80 |         return double.Parse(input);
      |                ^~~~~~
a.cc:80:16: error: expected ';' before 'double'
a.cc:80:22: error: expected unqualified-id before '.' token
   80 |         return double.Parse(input);
      |                      ^
a.cc: At global scope:
a.cc:184:11: error: expected ':' before 'void'
  184 |     public void Swap(ref int a, ref int b)
      |           ^~~~~
      |           :
a.cc:184:22: error: 'ref' has not been declared
  184 |     public void Swap(ref int a, ref int b)
      |                      ^~~
a.cc:184:22: error: two or more data types in declaration of 'a'
a.cc:184:31: error: expected ')' before ',' token
  184 |     public void Swap(ref int a, ref int b)
      |                     ~         ^
      |                               )
a.cc:184:33: error: variable or field 'ref' declared void
  184 |     public void Swap(ref int a, ref int b)
      |                                 ^~~
a.cc:184:33: error: expected ';' at end of member declaration
  184 |     public void Swap(ref int a, ref int b)
      |                                 ^~~
      |                                    ;
a.cc:184:41: error: expected ';' at end of member declaration
  184 |     public void Swap(ref int a, ref int b)
      |                                         ^
      |                                          ;
a.cc:184:42: error: expected unqualified-id before ')' token
  184 |     public void Swap(ref int a, ref int b)
      |                                          ^
a.cc:197:2: error: expected ';' after class definition
  197 | }
      |  ^
      |  ;