Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
我的英语输出方法http://blog.csdn.net/gavin_dyson/article/details/9945769public static String format(int n){ if(n % 10==1 && n% 100 !=11) return n+"st"; if(n % 10==2 && n% 100 !=12) return n+"nd"; if(n % 10==3 && n% 100 !=13) return n+"rd"; return n+"th"; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator