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

提供一个字符串过滤函数,用这个处理字符串就过了^_^

Posted by qiqilrq at 2007-04-20 03:20:22 on Problem 1119
char str[251];
char buf[251];
void filter()
{
	int i=0, j=0;
	
 	for(; buf[i]!=newl; i++)
	{
		if( isalpha(buf[i]) )
		{
		    str[j++]=tolower(buf[i]);
		}
		else  if( isdigit(buf[i]) )
		{
			str[j++]=buf[i];
		}		
	}
	str[j]=newl;
}

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