Four sides of square: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Alextretyak (talk | contribs) (Added 11l) |
||
Line 6: | Line 6: | ||
<br> |
<br> |
||
[http://keptarhely.eu/view.php?file=20220218v00x6hugz.jpeg Four sides of square - image] |
[http://keptarhely.eu/view.php?file=20220218v00x6hugz.jpeg Four sides of square - image] |
||
=={{header|11l}}== |
|||
{{trans|Python}} |
|||
<syntaxhighlight lang="11l"> |
|||
V size = 9 |
|||
L(row) 0 .< size |
|||
L(col) 0 .< size |
|||
I row == 0 | row == size - 1 | col == 0 | col == size - 1 |
|||
print(‘1’, end' ‘ ’) |
|||
E |
|||
print(‘0’, end' ‘ ’) |
|||
print() |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
1 1 1 1 1 1 1 1 1 |
|||
1 0 0 0 0 0 0 0 1 |
|||
1 0 0 0 0 0 0 0 1 |
|||
1 0 0 0 0 0 0 0 1 |
|||
1 0 0 0 0 0 0 0 1 |
|||
1 0 0 0 0 0 0 0 1 |
|||
1 0 0 0 0 0 0 0 1 |
|||
1 0 0 0 0 0 0 0 1 |
|||
1 1 1 1 1 1 1 1 1 |
|||
</pre> |
|||
=={{header|Ada}}== |
=={{header|Ada}}== |
||
Line 61: | Line 88: | ||
Usage: ./four_sides <length> |
Usage: ./four_sides <length> |
||
</pre> |
</pre> |
||
=={{header|ALGOL 68}}== |
=={{header|ALGOL 68}}== |