• 个人简介

    //小游戏:猜数字 #include <bits/stdc++.h> using namespace std; int main() { cout<<"猜猜我想的数(0-100):"; cout<<endl; int a=,b=0; bool p=false; while(p!=true) { if(a>100||a<0) { p=true; cout<<"裁判犯规,请重新开始(0-100的数)"; break; } cin>>b; if(b==a) { cout<<"猜对了"; p=true; } else { if(b>a) { cout<<"大了,"<<"0-"<<b<<endl; } else { cout<<"小了,"<<b<<"-100"<<endl; } } } return 0; } //复制后请对应起来。 //第7行中,“a=”0-100的任何数,请裁判输入。

  • 最近活动

  • Stat

  • Rating