Matrix with two diagonals: Difference between revisions
m
no edit summary
(→BQN: add) |
mNo edit summary |
||
Line 1:
{{Draft task|Matrices}}
;Task:
Line 460:
=={{header|Arturo}}==
<syntaxhighlight lang="rebol">drawSquare: function [side][
loop 1..side 'x ->
Line 1,524 ⟶ 1,523:
1 0 0 0 0 0 1
</pre>
=={{header|FreeBASIC}}==
Line 1,582 ⟶ 1,580:
{{out}}
https://www.dropbox.com/s/ph9r28gpkp8ao8n/twoDiagonalMatrix.bmp?dl=0
=={{header|Fortran}}==
Line 1,784 ⟶ 1,781:
=={{header|J}}==
Implementation:
Line 2,623 ⟶ 2,619:
}
</syntaxhighlight>
=={{header|Python}}==
===Pure Python===
Line 2,729 ⟶ 2,726:
=={{header|Quackery}}==
<syntaxhighlight lang="quackery"> [ [] swap dup times
[ 0 over of
Line 2,944 ⟶ 2,940:
1 0 0 0 1
</pre>
=={{header|Sidef}}==
<syntaxhighlight lang="ruby">func dual_diagonal(n) {
|