2
Answers

Drawing with C#

Christopher

Christopher

14y
2.9k
1
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)