{0,4} {1,4} {2,4} {3,4} {4,4}
using System;
public class MainClass {
public static void Main() {
Random rnd = new Random();
int[,] m = new int[3, 5];
for (int i = 0; i < m.GetLength(0); i++)
for (int j = 0; j < m.GetLength(1); j++)
m[i, j] = rnd.Next(1000);
for (int i = 0; i < m.GetLength(0); i++)
Console.WriteLine("{0,4} {1,4} {2,4} {3,4} {4,4}", m[i, 0], m[i, 1], m[i, 2], m[i, 3], m[i, 4]);
}
}
Related examples in the same category