Cantor set: Difference between revisions
Content deleted Content added
Forth version |
→{{header|Ruby}}: added intro |
||
Line 2,071: | Line 2,071: | ||
[https://www.dropbox.com/s/ap7c3301i0syh4e/CantorSet.jpg?dl=0 Cantor set] |
[https://www.dropbox.com/s/ap7c3301i0syh4e/CantorSet.jpg?dl=0 Cantor set] |
||
=={{header|Ruby}}== |
=={{header|Ruby}}== |
||
This works by numbering the segments (starting with 0) in base 3. Print whitespace if this number contains the digit 1; a black square otherwise. |
|||
<lang ruby>lines = 5 |
<lang ruby>lines = 5 |
||