#include<bits/stdc++.h>
using namespace std;
int main(){
int zhenqiu[1000];
int shuru[1000];
int yes;
int no;
char a[1000];
srand((unsigned int)time(NULL));
for(int i=0;i<1000;++i){
zhenqiu[i]=rand()%10;
}
while(true){
while(true){
system("cls");
cout<<"提示:<1";
for(int i=0;i<1000;++i){
cout<<"0";
}
cout<<endl;
yes=0;
no=0;
cin>>a;
for(int i=0;i<1000;++i){
shuru[i]=a[i]-'0';
}
for(int i=0;a[i]!='\0';++i){
no++;
}
for(int i=0;;++i){
if(no<1000){
cout<<"小了!"<<endl;
break;
}
if(no>1000){
cout<<"大了!"<<endl;
break;
}
if(zhenqiu[i]==shuru[i]){
++yes;
}
if(zhenqiu[i]<shuru[i]){
cout<<"大了!"<<endl;
break;
}
if(zhenqiu[i]>shuru[i]){
cout<<"小了!"<<endl;
break;
}
if(yes==1000){
return 0;
}
}
system("pause");
}
}
}
费肝猜数字
于 2024-08-14 17:25:35 首次发布