Twelve Days of Christmas by hinoe

o;char*p,s[]="\x09Twelve drummers drumming,\x09Eleven pipers piping,\x09Ten lords a-leaping,\x09Nine ladies dancing,\x09Eight maids a-milking,\x09Seven swans a-swimming,\x09Six geese a-laying,\x09Five golden rings,\x09Four calling birds,\x09Three French hens,\x09Two turtle doves,\x09A\x00first\x00second\x00third\x00four\x00fif\x00six\x00seven\x00eigh\x00nin\x00ten\x00eleven\x00twelf";main(i){for(;p=rindex(s,9);printf("On the %s%s day of Christmas,\nmy true love sent to me%s%s partridge in a pear tree%c\n\n",o=index(o?:s,0)+1,"th"-4/++i,p,"nd a\x00"-!o,"!."[p>s]))++*p;}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page