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 zrl at 2007-08-14 19:49:26 on Problem 3339
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:
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