这是一个坑人的小游戏

    科技2025-12-29  11

    这是一个坑人的小游戏

    #include<bits/stdc++.h> using namespace std; void zq() { cout<<"正确"<<endl; } void cw() { cout<<"错误"<<endl; } int main() { int n,x,s,daan,t,nn=rand()%20+1; char o,k; srand(time(0)); cout<<"请选择难度:1~10000000000000"<<endl; cin>>n; system("cls"); cout<<"公交车上原有x个人,请输入x"<<endl; cin>>x; system("cls"); t=x; for(int i=1;i<=nn;) { int a,b; a=rand()%n+1; b=rand()%n+1; while(x+a-b<0) { a=rand()%n+1; b=rand()%n+1; } t+=a; t-=b; cout<<"过了一站上来了"<<a<<"个人"<<endl; cout<<"下去了"<<b<<"个人"<<endl; cout<<"输入ok表示阅读完毕"<<endl; cin>>o>>k; if(o=='o'&&k=='k') i++; system("cls"); } s=rand()%4+1; if(s==1) { cout<<"问总共经过了几站?"<<endl; cin>>daan; if(daan==n) zq(); else { cw(); cout<<"总共经过了"<<nn<<"站"<<endl; } } if(s==2) { cout<<"问现在有多少个人"<<endl; cin>>daan; if(daan==t) zq(); else { cw(); printf("现在有%d个人\n",t); } } if(s==3) { cout<<"问司机是男的还是女的,男=1,女=2"<<endl; cin>>daan; if(daan==1) { cw(); printf("司机是女的\n"); } else { cw(); printf("司机是男的\n"); } } if(s==4) { cout<<"问特朗普帅不帅:1非常丑,2有点丑,3还行,4有点帅,5非常帅"<<endl; cin>>daan; if(daan==1) zq(); else { cw(); cout<<"特朗普这么丑你都不知道,你在想什么,傻子!!!"<<endl; } } return 0; }
    Processed: 0.017, SQL: 9