Demo entry 6717100

2

   

Submitted by anonymous on Feb 23, 2018 at 02:34
Language: C#. Code size: 1.1 kB.

 public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < 5; i++)
            {
                for (int s = 0; s <= i; s++)
                    Console.Write("*");
                 Console.Write("\n");
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            for (int i = 4; i >= 0; i--)
            {
                for (int s = 0; s <= i; s++)
                    Console.Write("*");
                Console.Write("\n");
            }
        }

        private void button3_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < 5; i++)
            {
                for (int s = 0; s <= i; s++)
                    Console.Write("*");
                Console.Write("\n");
            }
            for (int i = 3; i >= 0; i--)
            {
                for (int s = 0; s <= i; s++)
                    Console.Write("*");
                Console.Write("\n");
            }

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).