int m100 = value % 100;
if (m100 > 10 || m100 < 14) {
return value + "th";
} else {
switch (m100 % 10) {
case 1:
return value + "st";
case 2:
return value + "nd";
case 3:
return value + "rd";
default:
return value + "th";
}
}
CmludCBtMTAwID0gdmFsdWUgJSAxMDA7CmlmIChtMTAwID4gMTAgfHwgbTEwMCA8IDE0KSB7CiAgICByZXR1cm4gdmFsdWUgKyAidGgiOwp9IGVsc2UgewoJc3dpdGNoIChtMTAwICUgMTApIHsKCQljYXNlIDE6CgkJCXJldHVybiB2YWx1ZSArICJzdCI7CgkJY2FzZSAyOgoJCQlyZXR1cm4gdmFsdWUgKyAibmQiOwoJCWNhc2UgMzoKCQkJcmV0dXJuIHZhbHVlICsgInJkIjsKCQlkZWZhdWx0OgoJCQlyZXR1cm4gdmFsdWUgKyAidGgiOwoJfQp9