|
|
|
|
|
by modeless
4468 days ago
|
|
Here's a C version in less than 80 characters: main(c,r){for(r=32;r;)printf(++c>31?c=!r--,"\n":c<r?" ":~c&r?" `":" #");}
I first learned of this phenomenon in my discrete math class, and we had a competition to see who would write the shortest program to draw a Sierpinski triangle. This version would certainly have won if I'd been clever enough to write it at the time, though even shorter versions are possible in other languages. |
|