コード例 #1
0
        public static void Main(string[] args)
        {
            int n = GetMatrixSize();

            int[,] matrix = new int[n, n];
            int step = n;
            int i = 0;
            int j = 0;

            Matrix matr = new Matrix();

            matr.ConstructMatrix(matrix, i, j, n);

            matr.find_cell(matrix, out i, out j);

            if (i != 0 && j != 0)	// taka go napravih, zashtoto funkciqta ne mi davashe da ne si definiram out parametrite
            {
                matr.ConstructMatrix(matrix, i, j, n);
            }

            for (int row = 0; row < n; row++)
            {
                for (int col = 0; col < n; col++)
                {
                    Console.Write("{0,3}", matrix[row, col]);
                }

                Console.WriteLine();
            }
        }