Jump to content

Four sides of square: Difference between revisions

Added 11l
m (syntax highlighting fixup automation)
(Added 11l)
Line 6:
<br>
[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}}==
Line 61 ⟶ 88:
Usage: ./four_sides <length>
</pre>
 
 
=={{header|ALGOL 68}}==
1,481

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.