[Solved] combinations for numbers 0 to 40 [closed]


In haskell:

[(x, y) | x <- [1..40], y <- [1..40]]

In other languages you should probably look at for-loops: (this is C#)

Tuple<int, int>[,] things = new Tuple<int, int>[40,40];
for (int i = 0; i < 40; i++)
{
    for (int j = 0; j < 40; j++)
    {
        things[i,j] = Tuple.Create(i+1,j+1);
    }
}

5

solved combinations for numbers 0 to 40 [closed]