Search This Blog

Tuesday, 9 June 2015

A program to display the astrick pattern as given below

using System;
    class Class2
    {
        static void Main(string[] args)
        {
            int i, j;
            for (i = 0; i <6; i++)
            {
                for (j = 5; j > i; j--)
                {
                    Console.Write("");
                }
                for (int k = 0; k < i; k++)
                {
                    Console.Write("*");
                }
                Console.WriteLine();
            }
            Console.ReadLine();
        }
    }


OUTPUT

CLICK TO DOWNLOAD

 

No comments:

Post a Comment