using System;
using System.Windows.Forms;

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

        private void button1_Click(object sender, EventArgs e)
        {
            int[,] a = { { 3, 2, 1 }, { 5, 6, 7 }, { 7, 8, 2 } };

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