title: 12 Days Of Christmas C Program
body: <p>So I tried coding 12 days of Christmas by myself. I'm not yet done though with the lyrics, I'm still trying to figure out. But I don't understand why my "1st day" of Christmas gets doubled and partnered with a different gift and on the 12th day, no gift is showing up. I checked on my switch case and they seem to be right I guess. And is it possible that I could lessen my code to print out the complete lyrics?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;conio.h&gt;
  
  int main() // Main Function
  {
      int days, counter, num;
      //int counter = 1;  
  
      printf("\t\t***TWELVE DAYS OF CHRISTMAS***\n");
      printf("\t\t______________________________\n\n\n");
  
      for (counter=0; counter&lt;=12; counter++)
      {   
          // counter++;
          switch(counter)
          {
              case 1: printf("\t\tA Partridge in a Pear Tree\n");break; // Day 12
              case 2: printf("\t\tTwo Turtle Doves\n"); break;
              case 3: printf("\t\tThree French Hens\n"); break;
              case 4: printf("\t\tFour Calling Birds \n"); break;
              case 5: printf("\t\tFive Golden Rings\n"); break;
              case 6: printf("\t\tSix Geese a Laying\n"); break;
              case 7: printf("\t\tSeven Swans a Swimming\n"); break;
              case 8: printf("\t\tEight Maids a Milking\n"); break;
              case 9: printf("\t\tNine Ladies Dancing\n"); break;
              case 10: printf("\t\tTen Lords a Leaping\n"); break;
              case 11: printf("\t\tEleven Pipers Piping\n"); break;
              case 12: printf("\t\tTwelve Drummers Drumming\n"); break; // Day 1 
          }
          printf("\n\tOn the ");
  
          switch(counter){
              case 1:
                  printf("1st");
                  break;  
              case 2: 
                  printf("2nd");
                  break;
              case 3: 
                  printf("3rd");
                  break;
              case 4: 
                  printf("4th");
                  break;
              case 5: 
                  printf("5th");
                  break;      
              case 6: 
                  printf("6th");
                  break;
              case 7: 
                  printf("7th");
                  break;
              case 8: 
                  printf("8th");
                  break;  
              case 9: 
                  printf("9th");
                  break;
              case 10:    
                  printf("10th");
                  break;  
              case 11:    
                  printf("11th");
                  break;  
              case 12:    
                  printf("12th");
                  break;                                                                                      
                  default: 
                  printf("1st", num);
                  break;
              }
              printf(" day of Christmas my true love sent to me\n");
  
          }   
  
          getch();
          return 0;
      }
  </code></pre>
  
  <p>And the instructions says, "Your function will just be invoked in the main() function and will not return anything" So does it mean that I will not make more functions? Or should I place all of my codes inside the main function only? Or create separate codes?</p>