chat

4 条评论

  • @ 2025-11-13 16:58:45

    对不起 以下内容没有头文件 请自行添加

    • @ 2025-11-13 16:56:56
      using namespace std;
      int main(){
      	int shu,a;
      	cin>>shu;
          srand(time(0));
          a=rand()%(10-1+1)+1;
          if(shu==a){
          	cout<<"猜对了,真棒!"; 
      	}else{
      	    cout<<"很遗憾,猜错了。"<<endl;
      	    }
      	    cout<<"这个数是"<<a;
      	return 0;
      }
      
      
      

      智力测试(非正规,请勿相信。)

    • @ 2025-11-13 16:55:29
      using namespace std;
      int main(){
      	int shu,a;
      	cin>>shu;
          srand(time(0));
          a=rand()%(10-1+1)+1;
          if(shu==a){
          	cout<<"猜对了,真棒!"; 
      	}else{
      	    cout<<"很遗憾,猜错了。"<<endl;
      	    }
      	    cout<<"这个数是"<<a;
      	return 0;
      }
      
      
      
      

      猜数游戏

      • @ 2025-11-13 16:53:11
        using namespace std;
        int main(){
            int jiqi,ren;
            srand(time(0));
            jiqi=rand()%(3-1+1)+1;
            cin>>ren;
            cout<<jiqi<<endl;
            if(ren==1&&jiqi==2||ren==2&&jiqi==3||ren==3&&jiqi==1){
            	cout<<"人赢"; 
        	}else if(ren==1&&jiqi==3||ren==2&&jiqi==1||ren==3&&jiqi==2){
        		cout<<"机器赢";	
        	}else{
        		cout<<"平局"; 
        	}
        	return 0;
        }
        
        
        

        石头剪刀布游戏

        • 1