Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

我的英语输出方法http://blog.csdn.net/gavin_dyson/article/details/9945769

Posted by 19731988 at 2013-08-13 12:07:11 on Problem 2247
public 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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator