#include
#include
using namespace std;
int ans(int start,int end) //生成随机数的函数,start和end是他的范围
{
return start+(end-start)*rand()/(RAND_MAX+1);
}
int main()
{
srand(time(0));
char c;
int n=1,input,NOguess;
cout<<"I have a number between 1 and 1000."<
do{
cout<<"Please type your first guess."<
//if(input==-1){cout<<"The number is "<
if(input==NOguess){cout<<"Excellent!You guessed the number! "<
cout<<"Too high.Try again."<
cout<<"Would you like to play again (y or n)?"<
}while(c=='y'||c=='Y');
return 0;
}