You are on page 1of 1

using System;

public class Array {


static void Main(string[] args) {
// 0 1 2
int[] numbers = {2,3,4};
Console.WriteLine(numbers[1]);

string [] friends = new string[3];


friends[0] = "Jim";
friends[1] = "Kelly";
friends[2] = "Tom";

for(int i = 0; i < friends.Length; i++) {


Console.Write(friends[i] + " ");
}
Console.WriteLine();

int [,] Grid = {


{1,2,3},
{4,5,6},
{7,8,9}
};

Console.WriteLine(Grid[0,1]);
Console.WriteLine(Grid[1,1]);

int [,] Matrix = new int[2,3];


Matrix[0,0] = 1;
Matrix[0,1] = 2;
Matrix[0,2] = 3;
Matrix[1,0] = 4;
Matrix[1,1] = 5;
Matrix[1,2] = 6;

}
}

You might also like