| ||||||||||
| 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:问个很弱的问题In Reply To:问个很弱的问题 Posted by:goodpeter at 2007-08-19 16:32:56 > 看这两个区别
> while(cin>>a>>b)
> {
> .........
> }
>
> while(1)
> {
> cin>>a>>b
> }
>
> 第一种在什么情况下会跳出循环,假如不在循环体内设置条件的话。
用scanf,如下:
while(scanf("%d%d",&a,&b)!=EOF)
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator