home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / pctchnqs / 1991 / number6 / ordsfx.c < prev    next >
Text File  |  1991-11-21  |  264b  |  6 lines

  1. #define ordsfx(x) ((((x)-10)%100)/10 == 0 ? "th" :\
  2.                               (x)%10 == 1 ? "st" :\
  3.                               (x)%10 == 2 ? "nd" :\
  4.                               (x)%10 == 3 ? "rd" :\
  5.                                             "th")
  6.