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 anselcat at 2008-04-15 21:14:44 on Problem 1504
In 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:
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