Skip to content

Prints a Christmas tree to the console.

Notifications You must be signed in to change notification settings

stefandecimelli/christmas-tree

Repository files navigation

christmas-tree

Prints out a Christmas Tree based on the size. (Please ignore that I started this project with Quarkus).

Compile with:

./gradlew classes

Then my preferred way to run it is in JShell:

$ jshell --class-path build/classes/java/main
|  Welcome to JShell -- Version 25
|  For an introduction type: /help intro

jshell> import com.decimelli.christmas.ChristmasTreePrinter;

jshell> ChristmasTreePrinter tree = new ChristmasTreePrinter(10);
x ==> com.decimelli.christmas.ChristmasTreePrinter@31221be2

jshell> tree.print(System.out);
          *
         ***
        *****
       *******
      *********
     ***********
    *************
   ***************
  *****************
 *******************
          |

About

Prints a Christmas tree to the console.

Topics

Resources

Stars

Watchers

Forks

Languages