Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

###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.

added 280 characters in body
Source Link
Ilmari Karonen
  • 21k
  • 5
  • 55
  • 101

###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.

Source Link
Ilmari Karonen
  • 21k
  • 5
  • 55
  • 101

###Perl, 42 chars

say$"x9,"*";say$"x(9-$_),"00"x$_,0for 0..8

Output:

 *
 0
 000
 00000
 0000000
 000000000
 00000000000
 0000000000000
 000000000000000
 00000000000000000

AltStyle によって変換されたページ (->オリジナル) /