Mosaic matrix: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Alextretyak (talk | contribs) (Added 11l) |
||
Line 9: | Line 9: | ||
[http://keptarhely.eu/view.php?file=20220218v00xf1rfh.jpeg Mosaic Matrix - image] |
[http://keptarhely.eu/view.php?file=20220218v00xf1rfh.jpeg Mosaic Matrix - image] |
||
<br> |
<br> |
||
=={{header|11l}}== |
|||
{{trans|Python}} |
|||
<syntaxhighlight lang="11l"> |
|||
V size = 9 |
|||
L(Row) 0 .< size |
|||
L(Col) 0 .< size |
|||
I (Row % 2 == 1 & Col % 2 == 1) | (Row % 2 == 0 & Col % 2 == 0) |
|||
print(‘1’, end' ‘ ’) |
|||
E |
|||
print(‘0’, end' ‘ ’) |
|||
print() |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
1 0 1 0 1 0 1 0 1 |
|||
0 1 0 1 0 1 0 1 0 |
|||
1 0 1 0 1 0 1 0 1 |
|||
0 1 0 1 0 1 0 1 0 |
|||
1 0 1 0 1 0 1 0 1 |
|||
0 1 0 1 0 1 0 1 0 |
|||
1 0 1 0 1 0 1 0 1 |
|||
0 1 0 1 0 1 0 1 0 |
|||
1 0 1 0 1 0 1 0 1 |
|||
</pre> |
|||
=={{header|Ada}}== |
=={{header|Ada}}== |