Four sides of square: Difference between revisions
Content added Content deleted
m (→{{header|Quackery}}: tweaked indentation) |
(Added Sidef) |
||
Line 740: | Line 740: | ||
<br> |
<br> |
||
[http://keptarhely.eu/view.php?file=20220218v00x6hugz.jpeg Four sides of square] |
[http://keptarhely.eu/view.php?file=20220218v00x6hugz.jpeg Four sides of square] |
||
=={{header|Sidef}}== |
|||
<lang ruby>var n = 5 |
|||
[n.of(1), (n-2).of([1, (n-2).of(0)..., 1])..., n.of(1)].each {|row| |
|||
say row.join(' ') |
|||
}</lang> |
|||
{{out}} |
|||
<pre> |
|||
1 1 1 1 1 |
|||
1 0 0 0 1 |
|||
1 0 0 0 1 |
|||
1 0 0 0 1 |
|||
1 1 1 1 1 |
|||
</pre> |
|||
=={{header|Wren}}== |
=={{header|Wren}}== |