| ||||||||||
| 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 | |||||||||
ac过的代码while(cin>>n&&n)
{
if(n%10==1&&n%100!=11)
s="st";
else if(n%10==2&&n%100!=12)
s="nd";
else if(n%10==3&&n%100!=13)
s="rd";
else s="th";
cout<<"The "<<n<<s<<" humble number is "<<dp[n]<<"."<<endl;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator