| ||||||||||
| 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 | |||||||||
找不到错啊!!!!!!!#include <iostream>
#include <string>
using namespace std;
void main()
{
int n;char b1[10]="too high",b2[10]="too low",b3[10]="right on";
char a[10];
memset(a,0,sizeof(a));
int up=11,down=0;
while(cin>>n,n!=0)
{
cin.get();
gets(a);
if(strcmp(a,b1)==0)up=n;
else if(strcmp(a,b2)==0) down=n;
else if(strcmp(a,b3)==0)
{
if((n>down)&&(n<up))
cout<<"Stan may be honest"<<endl;
else cout<<"Stan is dishonest"<<endl;
up=11;down=0;
}
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator