Drawing with C#

May 30 2010 2:11 PM
Hi there,

I've just started programming and am having a hard time determining how to complete this exercise:

Use a for loop to create the following shapes:

            *           *********         

           ***           ********

          *****           *******

         *******           ******

        *********           *****

         *******             ****

          *****               ***

           ***                 **

            *                   *


This is the code I can come up with myself:

            for (int i = 0; i < 10;i++)
            {

                Console.Write("*");

                if(i == i)
                {
                 
                    Console.WriteLine("*");
                }

            }
                Console.Read();




Can anyone show me how to accomplish this?

Thanks in advance, C# is pretty cool.

Chris

Answers (2)