fork download
  1.  
  2. int m100 = value % 100;
  3. if (m100 > 10 || m100 < 14) {
  4. return value + "th";
  5. } else {
  6. switch (m100 % 10) {
  7. case 1:
  8. return value + "st";
  9. case 2:
  10. return value + "nd";
  11. case 3:
  12. return value + "rd";
  13. default:
  14. return value + "th";
  15. }
  16. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty