| ||||||||||
| 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 | |||||||||
为什么wa?!!!!!!!!!!!!!!???????///WHY?#include<iostream.h>
void main()
{
short a=1,b=10,c=1;
char f;
bool p=0;
cin>>c;
while(c!=0)
{
if(a>c||b<c)
p=1;
cin.ignore(5);
f=cin.get();
if(f=='h')
b=c-1;
if(f=='l')
a=c+1;
if(a>b)
p=1;
if(f=='t')
{
if(p)
cout<<"Stan is dishonest"<<endl;
else
cout<<"Stan may be honest"<<endl;
p=0,a=1,b=10;
}
while(1)
{
f=cin.get();
if(f=='\n')
break;
}
cin>>c;
}
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator