# include<iostream>
# include<time.h>
using namespace std;
int main()
{
int a,b;
srand(time(NULL));
a=1+(rand()%1000);
cout<<"scanf a numeber which you guess1-1000"<<endl;
cin>>b;
while(b!=-1)
{
if(b==a)
{
cout<<"You guessed the number"<<endl;
}
while(b<a)
{
cout<<"小了"<<endl;
cin>>b;
}
while(b>a)
{
cout<<"大了"<<endl;
cin>>b;
}
}
}