Magic squares of doubly even order: Difference between revisions
m
→{{header|Kotlin}}: Updated to version 1.1.0 which allows underscores in numeric literals
PatGarrett (talk | contribs) m (→{{header|VBScript}}: Shorter version) |
m (→{{header|Kotlin}}: Updated to version 1.1.0 which allows underscores in numeric literals) |
||
Line 952:
=={{header|Kotlin}}==
{{trans|Java}}
<lang scala>// version 1.
fun magicSquareDoublyEven(n: Int): Array<IntArray> {
Line 959:
// pattern of count-up vs count-down zones
val bits =
val size = n * n
val mult = n / 4 // how many multiples of 4
|