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

Re:根本就不需要开数组,贴一个直接逆转整数的code

Posted by try_and_try at 2007-07-20 02:35:08 on Problem 1504
In Reply To:Re:根本就不需要开数组,贴一个直接逆转整数的code Posted by:try_and_try at 2007-07-20 02:31:35
int revers( int n ) 
{
   int i,r=0;
   for(i=0 ; n>0; i++)
   {
      r = r*10 + n%10; 
      n /= 10; 
    }
    return r;
}


这个怎么样?^_^

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