The matrix representation program is used to display the given number of rows and columns in a matrix format.
class Program
{
static void Main(string[] args)
{
int row, col, i, j;
Console.WriteLine("Enter Number of Rows");
row = Console.Read();
Console.WriteLine("Enter Number of Columns");
col = Console.Read();
for(i=0; i<row; i++)
{
for (j = 0; j < col; j++)
{
Console.Write("*");
}
Console.Write("\n");
}
}
}