Monday 11 February 2013


// Program to print the following pattern
//   *****
//   *****
//   *****
//   *****
//   *****


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace pattern_4
{
    class Program
    {
        static void Main(string[] args)
        {
            int i,j, k;

            for (i = 1; i <= 5; i++)
            {
                for (j = 1; j <= i; j++)
                {
                    Console.Write("");
                }
                for (k = 1; k <= 5; k++)
                {
                    Console.Write("*");
                }
                Console.WriteLine();

            }
            Console.ReadKey();
        }
    }
}
  

No comments:

Post a Comment