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 |
发现数据的格式 提示下后人数据中每一组数据末尾紧跟着是换行,无多余空格(最后一组也是,也有一个换行) 我用的输入方法是: do { j=0; do { if(scanf( "%d", &num[j] )!=EOF)j++; scanf( "%c", &c ); }while( c != '\n' ); //于是一组数据就存入num数组中了。 if(j>0) { …… }//主程序 }while(j>0); 给组数据 2 -2 输出 :-( Try again. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator