1st 2nd 3rd 4th by piyo

using c = System.Console;
class P { static void Main() { string[] k = c.In.ReadToEnd().Split('\n'); string[] s = new string[] { "th", "st", "nd", "rd" }; for (int i = 0; i < k.Length - 1; i++)c.Write("{0}{1}\n", k[i], s[int.Parse(k[i]) % 10 < 4 ? (int.Parse(k[i]) / 10 % 10 == 1 ? 0 : int.Parse(k[i]) % 10) : 0]); } };

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page