using System;
using System.Windows.Forms;

namespace _5_9
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int[,] a = { { 2, 3, 1, 4 }, { 5, 8, 7, 6 } };
            int m = a.GetLength(0);
            int n = a.GetLength(1); 
            int[,] at = new int[n, m];

            for (int i = 0; i < m; i++)
                for (int j = 0; j < n; j++)
                    at[j, i] = a[i, j];

            for (int i = 0; i < n; i++)
            {
                for (int j = 0; j < m; j++)
                    textBox1.AppendText(at[i, j].ToString() + "  ");
                textBox1.AppendText(System.Environment.NewLine);
            }
        }
    }
}