[comp.binaries.ibm.pc.d] 12 days of cbip

dbin@norsat.UUCP (Dave Binette) (12/18/89)

/*
 * this is a waste of time
 * but then... so is subscribing to cbip
 *
 */

#include <stdio.h>

main()
{
    char * p;
    int    i = 1;
    int r;

    while (i <= 12)
    {
        switch(i % 10)
        {
            case 1:     p = "st"; break;
            case 2:     p = "nd"; break;
            case 3:     p = "rd"; break;
            default:    p = "th"; break;
        }
        r = (i % 100);
        if((r > 9) && (r < 21))
            p = "th";
        printf("On the %d%s day of Christmas, usenet gave to me... nothing in c.b.i.p\n", i++,p);
    }
    exit(0);
}