資源簡介
【實例簡介】盡管并不是真的詞……
代碼片段和文件信息
#include?
#include?
using?namespace?std;
int?main(){
????srand(time(NULL));
????int?n;
????char?a[n];
????string?chop;
????string?qp;
????int?life;
????bool?p[26]?=?{false};
????cout?<“歡迎來到猜詞游戲!(雖然電腦給的不是真的詞)“?<????cout?<“選擇模式?(1P?/?2P)“?<????cin?>>?chop;
????if(chop?==?“2P“){
????????cout?<“1號玩家,請輸入目標(biāo)詞“?<????????cin?>>?qp;
????????n?=?qp.size();
????????cout?<“請輸入您想給對方的機會數(shù)“?<????????cin?>>?life;
????????for(int?i?=?0;?i?????????????a[i]?=?qp[i];
????????}
????}else{
????????cout?<“請輸入你想猜的單詞的長度?“?<????????cin?>>?n;
????????cout?<“請輸入你想要的機會數(shù)?“?<????????cin?>>?life;
????}
????system(“cls“);
????bool?rev[n]?=?{false};
????if(chop?==?“1P“){
????????for(int?i?=?0;?i?
評論
共有 條評論