Magic squares of doubly even order: Difference between revisions

m
→‎{{header|Kotlin}}: Updated to version 1.1.0 which allows underscores in numeric literals
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.01.60
 
fun magicSquareDoublyEven(n: Int): Array<IntArray> {
Line 959:
 
// pattern of count-up vs count-down zones
val bits = 0b10010110011010010b1001_0110_0110_1001
val size = n * n
val mult = n / 4 // how many multiples of 4
9,490

edits