Four sides of square: Difference between revisions
Content added Content deleted
mNo edit summary |
(→K: add) |
||
Line 954: | Line 954: | ||
squareonesapp(8) |
squareonesapp(8) |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
=={{header|K}}== |
|||
<syntaxhighlight lang="k">square: {x|/:x}{x||x}@~-':!: |
|||
square 5</syntaxhighlight> |
|||
{{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|Mathematica}}/{{header|Wolfram Language}}== |
=={{header|Mathematica}}/{{header|Wolfram Language}}== |