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 |
谢谢了In Reply To:scanf(" %s",&s)是可以忽略连续空白的 Posted by:alpc62 at 2007-08-14 19:42:35 > char c,s[100]; > > scanf("%d %s %c",&&&);//略写了 > while (scanf("%c",&c),c==' ') > { > scanf(" %s",&s);//%s前和"有一个空格,可以忽略空白 > .....//处理每个 XXXX-XXXX 过程 > } > > 这样子就能读进来 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator