Assignment 4

Feeling festive? Your job is to create a christmas tree which looks like this -

      *
     **
    ***
   ****
  *****
 ******
*******

You will need to use nested for loops in order to create the pattern. You will need to alternate between -

System.out.print(" ");

System.out.print("*");

Notice that println is not used as ln prints on a new line. That being said you will need to print a new line at some point to move the pattern on.

You will get partial credit if you can make the following pattern -

*
**
***
****
*****
******
*******

 
Basics
Menu
Search