#include <iostream> using namespace std; int main() { int a,b,c,d,e,f,j,h,i,g; cout<<"下面我们做一个小游戏"<<endl; cout<<"请您每次任意输入1~10的一个数字,按回车键"<<endl; cout<<"我们为你准备了一个幸运数字"<<endl; cin>>a; switch(a) { case 1:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 2:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 3:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 4:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 5:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 6:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 7:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 8:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 9:cout<<"哇,你真是天才,恭喜你猜对啦!"<<endl;break; case 10:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; default :cout<<" sorry you are wrong"<<endl;break; } cin>>b; switch(b) { case 1:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 2:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 3:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 4:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 5:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 6:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 7:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 8:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 9:cout<<"哇,你真是天才,恭喜你猜对啦!"<<endl;break; case 10:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; default :cout<<" sorry you are wrong"<<endl;break; } cin>>c; switch(c) { case 1:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 2:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 3:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 4:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 5:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 6:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 7:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 8:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 9:cout<<"哇,你真是天才,恭喜你猜对啦!"<<endl;break; case 10:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; default :cout<<" sorry you are wrong"<<endl;break; } cin>>d; switch(d) { case 1:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 2:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 3:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 4:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 5:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 6:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 7:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 8:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 9:cout<<"哇,你真是天才,恭喜你猜对啦!"<<endl;break; case 10:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; default :cout<<" sorry you are wrong"<<endl;break; } cin>>e; switch(e) { case 1:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 2:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 3:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 4:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 5:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 6:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 7:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 8:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 9:cout<<"哇,你真是天才,恭喜你猜对啦!"<<endl;break; case 10:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; default :cout<<" sorry you are wrong"<<endl;break; } cin>>f; switch(f) { case 1:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 2:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 3:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 4:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 5:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 6:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 7:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 8:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 9:cout<<"哇,你真是天才,恭喜你猜对啦!"<<endl;break; case 10:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; default :cout<<" sorry you are wrong"<<endl;break; } cin>>j; switch(j) { case 1:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 2:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 3:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 4:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 5:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 6:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 7:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 8:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 9:cout<<"哇,你真是天才,恭喜你猜对啦!"<<endl;break; case 10:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; default :cout<<" sorry you are wrong"<<endl;break; } cin>>h; switch(h) { case 1:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 2:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 3:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 4:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 5:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 6:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 7:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 8:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 9:cout<<"哇,你真是天才,恭喜你猜对啦!"<<endl;break; case 10:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; default :cout<<" sorry you are wrong"<<endl;break; } cin>>i; switch(i) { case 1:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 2:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 3:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 4:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 5:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 6:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 7:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 8:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 9:cout<<"哇,你真是天才,恭喜你猜对啦!"<<endl;break; case 10:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; default :cout<<" sorry you are wrong"<<endl;break; } cin>>g; switch(g) { case 1:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 2:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 3:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 4:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 5:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 6:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 7:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 8:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; case 9:cout<<"哇,你真是天才,恭喜你猜对啦!"<<endl;break; case 10:cout<<"很抱歉,您猜错了,再试一次"<<endl;break; default :cout<<" sorry you are wrong"<<endl;break; } return 0; }