>>147
Ex.
// 但し、11-13を"th"にする処理は割愛
void printOrder(unsigned num)
{
static char const * const foo[] = {"th", "st", "nd", "rd"};
int order = num % 10;
if (order >= sizeof(foo) / sizeof(*foo)) order = 0;
printf("%d%s", num, foo[order]);
}