Mosaic matrix: Difference between revisions

J
(Add Red)
(J)
Line 220:
. 1 . 1 . 1 . 1
</pre>
 
=={{header|J}}==
 
Implementation:
<lang J> mosq=:{{0=~:/~2|i.y}}</lang>
 
Examples:
 
<lang J> mosq 4
1 0 1 0
0 1 0 1
1 0 1 0
0 1 0 1
mosq 5
1 0 1 0 1
0 1 0 1 0
1 0 1 0 1
0 1 0 1 0
1 0 1 0 1</lang>
 
=={{header|Julia}}==
6,962

edits