-
Notifications
You must be signed in to change notification settings - Fork 0
/
arrays.cs
37 lines (34 loc) · 903 Bytes
/
arrays.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestCode
{
class Program
{
static void Main(string[] args)
{
////single dimensional array
//int[] sdarr = new int[] { 1,2,3,4,5,6 };
////printig out the values
//for (int i=0; i<=5; i++)
//{
// Console.WriteLine(sdarr[i]);
//}
//int[,] mdarr = new int[2, 3];
////multi dimensional array
int[,] mdarr = { {1,2,3}, {4,5,6} };
////printig out the values
for (int i=0; i<=1; i++)
{
for (int j=0; j<=2; j++)
{
Console.WriteLine(mdarr[i,j]);
}
}
////waiting for input
Console.ReadKey();
}
}
}