| ||||||||||
| 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 | |||||||||
Re:根本就不需要开数组,贴一个直接逆转整数的codeIn Reply To:Re:根本就不需要开数组,贴一个直接逆转整数的code Posted by:try_and_try at 2007-07-20 02:35:08 int reverse(int n)
{
int res = 0;
while(n)
{
res = 10*res + (n%10);
n=n/10;
}
return res;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator