Saturday, 3 February 2018

Using C# program Draw Result

 1         2

 2         3

 3         4

 4         5

Solution :

public static void SampleMethod()
        {

            for (int i = 1; i <= 4; i++)
            {
                for (int j = i; j <= i + 1; j++)
                {

                    Console.Write(j + " ");
                }
                Console.WriteLine();
            }
        }

0 comments:

Post a Comment

Powered by Blogger.

Followers

Translate

Currency Converter

Exchange Rate

Featured post

Interpolation in angular 5

When we want to communicate from component class to template ,we can use interpolation which use the { { expression }} to render the bound...

Popular Posts

My Facebook Page