How to resolve the algorithm Sierpinski carpet step by step in the Phix programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Sierpinski carpet step by step in the Phix programming language

Table of Contents

Problem Statement

Produce a graphical or ASCII-art representation of a Sierpinski carpet of order   N.

For example, the Sierpinski carpet of order   3   should look like this: The use of the   #   character is not rigidly required for ASCII art. The important requirement is the placement of whitespace and non-whitespace characters.

Let's start with the solution: