###Perl, 42 chars
Perl, 42 chars
say$"x9,"*";say$"x(9-$_),"00"x$_,0for 0..8
Output:
*
0
000
00000
0000000
000000000
00000000000
0000000000000
000000000000000
00000000000000000
The height of the tree can be changed between 1 and 11 rows by replacing the 8 at the end with values from -1 to 9. Going above 11 rows requires also increasing the two 9s earlier in the code, which control how far from the left side of the screen the tree is indented.
###Perl, 42 chars
say$"x9,"*";say$"x(9-$_),"00"x$_,0for 0..8
Output:
*
0
000
00000
0000000
000000000
00000000000
0000000000000
000000000000000
00000000000000000
The height of the tree can be changed between 1 and 11 rows by replacing the 8 at the end with values from -1 to 9. Going above 11 rows requires also increasing the two 9s earlier in the code, which control how far from the left side of the screen the tree is indented.
Perl, 42 chars
say$"x9,"*";say$"x(9-$_),"00"x$_,0for 0..8
Output:
*
0
000
00000
0000000
000000000
00000000000
0000000000000
000000000000000
00000000000000000
The height of the tree can be changed between 1 and 11 rows by replacing the 8 at the end with values from -1 to 9. Going above 11 rows requires also increasing the two 9s earlier in the code, which control how far from the left side of the screen the tree is indented.
###Perl, 42 chars
say$"x9,"*";say$"x(9-$_),"00"x$_,0for 0..8
Output:
*
0
000
00000
0000000
000000000
00000000000
0000000000000
000000000000000
00000000000000000
The height of the tree can be changed between 1 and 11 rows by replacing the 8 at the end with values from -1 to 9. Going above 11 rows requires also increasing the two 9s earlier in the code, which control how far from the left side of the screen the tree is indented.
###Perl, 42 chars
say$"x9,"*";say$"x(9-$_),"00"x$_,0for 0..8
Output:
*
0
000
00000
0000000
000000000
00000000000
0000000000000
000000000000000
00000000000000000
###Perl, 42 chars
say$"x9,"*";say$"x(9-$_),"00"x$_,0for 0..8
Output:
*
0
000
00000
0000000
000000000
00000000000
0000000000000
000000000000000
00000000000000000
The height of the tree can be changed between 1 and 11 rows by replacing the 8 at the end with values from -1 to 9. Going above 11 rows requires also increasing the two 9s earlier in the code, which control how far from the left side of the screen the tree is indented.
###Perl, 42 chars
say$"x9,"*";say$"x(9-$_),"00"x$_,0for 0..8
Output:
*
0
000
00000
0000000
000000000
00000000000
0000000000000
000000000000000
00000000000000000