24
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
//two dimensional array declared and initiliazed
8
int row=2;
9
int columns=4;
10
int[,] matrix = new int[2,4]{
11
{0, 2, 4, 8}, // row 0 values
12
{10, 12, 14, 16}, // row 1 values
13
};
14
15
16
for (int i=0; i<row; i++)
17
{
18
for (int j=0; j<columns; j++)
19
{
20
Console.WriteLine(" Row "+i+ " , column "+j +" value ="+matrix[i, j]);
21
}
22
}
23
}
24
}
Cached Result