Cantor set: Difference between revisions
Content deleted Content added
Added VTL-2 |
|||
Line 3,890:
*** *** *** *** *** *** *** ***
* * * * * * * * * * * * * * * *
</pre>
=={{header|VTL-2}}==
<syntaxhighlight lang="vtl2">
1010 L=4
1020 I=1
1030 X=1
1040 I=I+1
1050 X=X*3
1060 #=I<L*1040
2010 I=0
2020 :I)=35
2030 $=:I)
2040 I=I+1
2050 #=I<X*2020
2060 ?=""
2070 W=X
2080 G=1
2090 W=W/3
2100 G=G*3
2110 S=1
2120 C=0
2130 I=1
2140 #=S/2*0+%=1*2160
2150 :C)=32
2160 $=:C)
2170 C=C+1
2180 I=I+1
2190 #=W>I*2140
2200 S=S+1
2210 #=C<X*2130
2220 ?=""
2230 L=L-1
2240 #=1<L*2090
</syntaxhighlight>
{{out}}
<pre>
###########################
######### #########
### ### ### ###
# # # # # # # #
</pre>
Line 3,922 ⟶ 3,963:
* * * * * * * * * * * * * * * *
</pre>
=={{header|XPL0}}==
<syntaxhighlight lang="xpl0">proc Cantor(N, LineSeg, Len); \Delete middle third of LineSeg
|