#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
srand((unsigned)time(0));
a = rand()%100+1;
cout<< "1~100的一个数"<<endl;
system("color 5f");
while(1){
cin>>b;
if(a<b){
cout<< "大了!!!"<<endl;
system("color 39");
}else if(a>b){
cout<< "小了!!!"<<endl;
system("color 8c");
}else{
cout<< "对了! ! !"<<endl;
system("color 4b");
break;
}
}
return 0;
}
猜数字小游戏
于 2023-12-17 20:00:09 首次发布