话不多说,直接上代码!
#include#include #include using namespace std; char s; char gxia='A',choose; int rand1,numn; bool flag=true; int cishu=0; void menu() { system("color 3D"); cout< 'C'); } void nac() { system("cls"); system("color BF"); cout< gxia||choose<'A'); } void ddd() { MessageBox(GetForegroundWindow(),"游戏中会随机生成一个数,你要找出这个n数(猜的次数只有10次)(第五关重来几次n有几率次数减少)","帮助",1); } void num1() { system("cls"); system("color 4E"); rand1=rand()%31+20; do { cin>>numn; cishu++; if(numn rand1) cout<<"太大了!!!n"; if(cishu>=10) flag=false; } while(numn!=rand1&&cishu<10); if(flag) { cout<<"恭喜你猜中了!"< >numn; cishu++; if(numn rand1) cout<<"太大了!!!n"; if(cishu>=10) flag=false; } while(numn!=rand1&&cishu<10); if(flag) { cout<<"恭喜你猜中了!"< >numn; cishu++; if(numn rand1) cout<<"太大了!!!n"; if(cishu>=10) flag=false; } while(numn!=rand1&&cishu<10); if(flag) { cout<<"恭喜你猜中了!"< >numn; cishu++; if(numn rand1) cout<<"太大了!!!n"; if(cishu>=10) flag=false; } while(numn!=rand1&&cishu<10); if(flag) { cout<<"恭喜你猜中了!"< >numn; cishu++; if(numn rand1) cout<<"太大了!!!n"; if(cishu>=10) flag=false; } while(numn!=rand1&&cishu<10); if(flag) { cout<<"恭喜你猜中了!"< >numn; cishu++; if(numn rand1) cout<<"太大了!!!n"; if(cishu>=10) flag=false; } while(numn!=rand1&&cishu<10); if(flag) { cout<<"恭喜你猜中了!"< >numn; cishu++; if(numn rand1) cout<<"太大了!!!n"; if(cishu>=10) flag=false; } while(numn!=rand1&&cishu<10); if(flag) { cout<<"恭喜你猜中了!"< >numn; cishu++; if(numn rand1) cout<<"太大了!!!n"; if(cishu>=10) flag=false; } while(numn!=rand1&&cishu<10); if(flag) { cout<<"恭喜你猜中了!"< >numn; cishu++; if(numn rand1) cout<<"太大了!!!n"; if(cishu>=10) flag=false; } while(numn!=rand1&&cishu<10); if(flag) { cout<<"恭喜你猜中了!"< >numn; cishu++; if(numn rand1) cout<<"太大了!!!n"; if(cishu>=10) flag=false; } while(numn!=rand1&&cishu<10); if(flag) { cout<<"恭喜你猜中了!"<



