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 |
Re:就算是水题吧...但是小弟读入字符串的时候用scanf过了..用gets就不行...很诧异啊...大家谁能解释下?In Reply To:就算是水题吧...但是小弟读入字符串的时候用scanf过了..用gets就不行...很诧异啊...大家谁能解释下? Posted by:bsshanghai at 2010-11-28 18:35:05 gets()能读空行,如果两组数据之间有一个空行,用gets()就会出现问题,而scanf()就可以将多余的空行过滤掉。 例如 2 5 825 用gets()读数据的时候就会出项问题~~~~~ Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator