user
A magic square is an **NxN** square matrix whose numbers consist of consecutive numbers arranged so that the sum of each row and column, *and* both diagonals are equal to the same sum (which is called the *magic number* or *magic constant*).

A magic square of singly even order has a size that is a multiple of 4, plus 2 (e.g. 6, 10, 14). This means that the subsquares have an odd size, which plays a role in the construction.

Task

Create a magic square of 6 x 6.

Related tasks

* Magic squares of odd order
* Magic squares of doubly even order

See also

* Singly Even Magic Squares (1728.org)
assistant
(formerly Perl 6)

See Magic squares/Raku for a general magic square generator.

Output:

With a parameter of 6:

```
35  1  6 26 19 24
 3 32  7 21 23 25
31  9  2 22 27 20
 8 28 33 17 10 15
30  5 34 12 14 16
 4 36 29 13 18 11

The magic number is 111
```

With a parameter of 10:

```
 92  99   1   8  15  67  74  51  58  40
 98  80   7  14  16  73  55  57  64  41
  4  81  88  20  22  54  56  63  70  47
 85  87  19  21   3  60  62  69  71  28
 86  93  25   2   9  61  68  75  52  34
 17  24  76  83  90  42  49  26  33  65
 23   5  82  89  91  48  30  32  39  66
 79   6  13  95  97  29  31  38  45  72
 10  12  94  96  78  35  37  44  46  53
 11  18 100  77  84  36  43  50  27  59

The magic number is 505
```