31
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
int[,] getal = new int[3, 6];
8
string uitvoer = "";
9
Random willekeurig = new Random();
10
11
for (int x = 0; x <= getal.GetUpperBound(0); x++)
12
{
13
for (int y = 0; y <= getal.GetUpperBound(1); y++)
14
{
15
getal[x, y] = willekeurig.Next(1, 7);
16
}
17
}
18
19
for (int x = 0; x <= getal.GetUpperBound(0); x++)
20
{
21
uitvoer += "Reeks " + (x + 1) + ":";
22
for (int y = 0; y <= getal.GetUpperBound(1); y++)
23
{
24
uitvoer += Convert.ToString(getal[x, y]).PadLeft(10);
25
}
26
uitvoer += Environment.NewLine;
27
}
28
29
Console.WriteLine(uitvoer);
30
}
31
}
Cached Result
1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 -