Mosaic matrix: Difference between revisions

m
no edit summary
(→‎J: simplify)
mNo edit summary
Line 1:
{{Draft task|Matrices}}
;Task:
Draw a 'mosaic' matrix which, for the purposes of this task, is a square matrix which has 1's in alternate cells (both horizontally and vertically) starting with a 1 in the top-left hand cell.
Line 17:
=={{header|11l}}==
{{trans|Python}}
 
<syntaxhighlight lang="11l">
V size = 9
Line 45 ⟶ 44:
<syntaxhighlight lang="action!">
;;; draw a "mosaic matrix" - one with a 1 in the top-left and then
;;; alternating with another character vertically and horiontallyhorizontally
 
;;; draws a mosaic matrix with height and width = n
Line 230 ⟶ 229:
 
=={{header|Arturo}}==
 
<syntaxhighlight lang="rebol">drawSquare: function [side][
loop 1..side 'x ->
Line 1,095 ⟶ 1,093:
0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1</pre>
 
 
=={{header|PL/M}}==
Line 1,272 ⟶ 1,269:
 
=={{header|Quackery}}==
 
<syntaxhighlight lang="quackery"> [ 1 & not ] is even ( n --> b )
 
559

edits