Write C# code to display the asterisk pattern as shown below:
*****
*****
*****
*****
*****


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

namespace asteriskpattern

{
    class Program
    {
        static void Main(string[] args)
        {
            int n = 5, i, j;
            for (i = 1; i <= n; i++)
            {
                for (j = 1; j <= n; j++)
                {
                    Console.Write("*");
                }
                Console.Write("\n");
            }
            Console.ReadKey();
        }
    }
}

Output:

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

Popular posts from this blog

Write a program to check whether empty query string is entered in Asp.Net.

Mandavrayji Temple, Muli, Surendranagar, Gujarat

Write a program to change color of Label text control programmatically in Asp.Net.