title: Creating a Christmas tree programatically in c?
body: <p>I need help with creating a Christmas tree in C which varies based on user input.</p>
  
  <p>Firstly, the user is prompted for the number of levels they want on the tree. E.g. First level "*", second level "***". Two stars are added every level.</p>
  
  <p>Valid levels run between 4 and 10 inclusive. Anything less than 4 or greater than 10 is invalid, an error message will be displayed in the program output and the minimum level of the tree will also be displayed (4 levels). </p>
  
  <p>The final part of the tree is done by adding a trunk with a width of 3 stars and a height of 2 stars.</p>
  
  <p>This is my c program. It is incomplete and I have no idea how to move on. I am totally confused.</p>
  
  <pre><code> #include &lt;stdio.h&gt;
  void main()
  {
      char choice;
      int level, levelcount, star, starcount;
  
  
  
      printf("Do you want to print a Christmas Tree (Y/N)?");
      scanf_s(" %c", &amp;choice);
  
      if (choice == 'Y')
      {
          printf("How tall is your Christmas Tree (Level 4 to 10)?");
          scanf_s("%d", &amp;levelcount);
  
      starcount = 1;
      for (level = 1; level &lt;= levelcount; level++)
      {
          for (star = 1; star &lt;= starcount; star++)
          {
              printf("*");
          }
          printf("\n");
      }
          starcount += 2;
      }
      else if (choice == 'N')
      {
          printf("Merry Christmas and Goodbye!\n");
      }
  
  
  }
  </code></pre>