using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

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

        private void button1_Click(object sender, EventArgs e)
        {
            label1 .Text = "";
            int i, j;
            const int num = 5;
            while (true)
            {
                for (i = 1; i <= num; i++)
                {
                    for (j = 1; j <= i; j++)
                    {
                        label1.Text += j.ToString();
                        label1.Text += "  ";
                    }//end of for
                    label1.Text += "\n";
                }//end of for
                if (i > num)
                    break;
            }//end of while
        }//end of method
    }
}
