Code Golf: Print the entire "12 Days of Christmas" song in the fewest lines of code.
Posted
by fizzer
on Stack Overflow
See other posts from Stack Overflow
or by fizzer
Published on 2008-12-20T15:20:58Z
Indexed on
2010/06/10
17:22 UTC
Read the original article
Hit count: 274
Print all 12 verses of the popular holiday song.
By 12 verses I mean the repetition of each line as is sung in the song, ie
Verse One: On the first day of Christmas my true love gave to me a partridge in a pear tree.
Verse Two On the second day of Christmas my true love gave to me two turtle doves and a partridge in a pear tree.
...
Verse N: On the nth day of Christmas my true love gave to me (Verse N-1 without the first line) (line added in verse N)
© Stack Overflow or respective owner