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:
*****
*****
*****
*****
*****