为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

猜字游戏

2017-09-21 2页 doc 12KB 36阅读

用户头像

is_654168

暂无简介

举报
猜字游戏猜字游戏 /* 20121378041 In submitting this work I declare it to be my own work which does not involve plagiarism. Should mywork be found to be copied I acknowledge that I will get zero marks. */ #include #include #include using namespace std; void main (){ ch...
猜字游戏
猜字游戏 /* 20121378041 In submitting this work I declare it to be my own work which does not involve plagiarism. Should mywork be found to be copied I acknowledge that I will get zero marks. */ #include #include #include using namespace std; void main (){ char y; char a[8]="_______"; bool letterFound = false; int chances = 10; char x[8] = "special"; while (chances>0) { letterFound=false; for (int i = 0; i < 7 ; i ++) { cout << "_ "; } cout << "Please guess the word by entering a letter " << endl; cin>>y; for (int c = 0; c < 7 ; c++) { if (y== x[c] ) { a[c]=y; letterFound = true;} } if (letterFound ==true) {cout << " The letter was in the word!" <
/
本文档为【猜字游戏】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索