|
|
Arrays
A05.cs
using System;
class Test {
public static void Main() {
string[][] a = new string[3][];
a[0] = new string[] {"Alice", "Bob", "Charly"};
a[1] = new string[] {"Rome", "Paris", "London", "Berlin", "Madrid"};
a[2] = new string[] {"Beans", "Peas", "Carots", "Potatoes"};
for (int i = 0; i < a.Length; i++) {
for (int j = 0; j < a[i].Length; j++) {
Console.Write(a[i][j] + " ");
}
Console.WriteLine();
}
}
}
|
|