// file: xmasCarol.cpp
// by: Dawn Lawrie
// date: September 24, 2003

// Outline for solving problem 2.64 - "The Twelve Days of Christmas song"
// The song can be found at www.12days.com/library/carols/12daysofxmas.htm

#include <iostream.h>

int main() {

  // loop through all the days
  for (int day = 1; day <= 12; day++) {
    // print out the first part that all verses begin with
    cout <<"On the "; 

    // Use a switch statement to print the nth day
    switch ( day ) {    
    case 1:					  
      cout << "First";
      break;
      
    case 2:
      cout << "Second";  
      break;
      
    case 3:
      cout << "Third";  
      break;
      
    case 4:
      cout << "Fourth"; 
      break;
      
    case 5:
      cout << "Fifth";
      break;
      
    case 6:
      cout << "Sixth"; 
      break;
      
    case 7:
      cout << "Seventh";
      break;
      
    case 8:
      cout << "Eighth"; 
      break;
      
    case 9:
      cout << "Ninth"; 
      break;
      
    case 10:
      cout << "Tenth";
      break;
      
    case 11:
      cout << "Eleventh";  
      break;
      
    case 12:
      cout << "Twelfth";  
      break;
      
    } 

    // Print the remainder of that line and then next line which
    // all verses have in common
    cout << " day of Christmas" << endl
	 << "My true love gave to me" << endl << endl;

    // Use a switch statement to print the recital of the days
    // Hint: have the largest day as the first case and allow cases
    //       to fall into the next case when appropriate
    switch (day) { 
    case 12:
      cout <<  "Twelve Drummers Drumming" << endl;
    case 11:
      cout <<  "Eleven Pipers Piping" << endl;
    case 10:
      cout <<  "Ten Lords a Leaping" << endl;
    case 9:
      cout <<  "Nine Ladies Dancing" << endl;
    case 8:
      cout <<  "Eight Maids a Milking" << endl;
    case 7:
      cout <<  "Seven Swans a Swimming" << endl;
    case 6:
      cout <<  "Six Geese a Laying" << endl;
    case 5:
      cout <<  "Five Golden Rings" << endl;
    case 4:
      cout <<  "Four Calling Birds" << endl;
    case 3:
      cout <<  "Three French Hens" << endl;
    case 2:
      cout <<  "Two Turtle Doves" << endl
	   <<  "And a Partridge in a Pear Tree" << endl << endl;
      break;
    case 1:
      cout <<  "A Partridge in a Pear Tree" << endl << endl;
      break;
      
    } //end switch
  }

  return 0;
}
