猜字母的小游戏
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
猜字母的小游戏
#include
#include
using namespace std;
char pass1[30][40]={{"wave 挥手,挥动"},{"bend 使弯曲
"},{"tear 眼泪"},{"dog 狗"},{"cat 猫"},{"book 书
"},{"good 好的"},{"best 最好的"},{"star 星星"},{ "war 战争"},{"cure 治疗"},{"push 推"},{"pull 拉
"},{"copy 复制"},{"bed 床"},{"beg 恳求"},{"hand 手
"},{"foot 脚"},{"note 便条"},{"mark 标记"},{"pass 通过"},
{"heat 头"},{"busy 买"},{"pool 池塘"},{"beef 牛肉"},{"pair 一双"},{"bill 账单"},{"bet 打赌"},{"move 移动"},{"join 加入"}/*,{"plan 计划"}*/};
char pass2[30][40]={{"regard 尊敬"},{"tourist 旅游者"},{"group 团队"},{"warmly 温暖的"},{"guide 导游者
"},{"western 西方的"},{"pardon 重复"},
{"bless 祝福"},{"emtra 特别的"},{"mirror 镜子
"},{"seldom 很少的"},{"airport 飞机场"},{"single 单身"},{"widely 广泛的"},{"garden 花园"},{"hardly 几乎不"}, {"greet 欢迎"},{"admit 承诺"},{"afraid 害怕
"},{"custom习俗"},{"doubt 怀疑"},{"peace 和平"},{"weekend 周末"},{"weekday 工作日"},{"dollar 美元"},{"ancient 古老的"},
{"reply 回复"},{"touch 接触"},{"shake 握手"},{"joyful 充满快乐的"}};
char pass3[30][40]={"saleswoman 销售员","handsome 英俊的","neighbour 邻居","friendship 友好的","quietness 安静的","interestingly 有趣地",
"delicious 美味的","darkness 黑暗","complaint 抱怨","apologize 道歉","professor 教授","downtown 商业街","responsibility 责任",
"hopefully 有希望的","immediately 立即","confidence
信心","adventure冒险","carelessness 粗心的","emplanation
说明","occupation 职业",
"impossible 不可能的","transportation 运输","gentleman 绅士","continent 大洲","unfinished 未完成的","fortunately 幸运的","astonishment 惊讶",
"communication 交流","combination 联合","earphones 耳机"};
int main()
{
char a[10][40] , zj[20] , sr[20] , aa[10][40]={0} , c ,
z , gb[30][40]; //zj代表中间数组 sr代表输入的数组 c代
表用户输入输入的数判断是否继续 aa数组代表除掉中文以后的pass数组
int x ,cc ,ce ,jb , p=0 , cd, cw=0 ,i , u=1 , qq[10] ; //cw代表错误的个数 cd,cc,ce代表*的位置 qq代表错误的单词
cout<<"*************************************************
*****************************"< cout<<"请您输入您所需要的级别"< cout<<"************************************************* *****************************"< cout<<"\t\t\t\t1.初级"< cout<<"\t\t\t\t2.中级"< cout<<"\t\t\t\t3.高级"< cout<<"************************************************* ******************************"< cout<<"************************************************* ******************************"< cin>>jb; cout<<"************************************************* ******************************"< srand ((unsigned)time(0)); while (true) { switch (jb) { case 1: { cw=0; if(u==1) cout<<"欢迎您来到第一关,这关的难度系数较低,只是让您进入一下状态罢了O(∩_∩)O~ "< else cout<<"重新来过,相信您这次一定可以的!↖(^ω^)↗ 加油!"< for(i=0 ; i<30 ; i++) strcpy(gb[i],pass1[i]); for(int i = 0 ; i < 10 ; i++) { x=rand()%(30-i); strcpy(a[i],gb[x]); for(int j = x ; j < 30-1 ; j++)