Matrix representation program in C#

Sumank
Posted by Sumank under C# category on | Points: 40 | Views : 1202
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");
}
}
}

Comments or Responses

Login to post response