}
}
}
ShowStatus(0); while(GetTotalScore(hands[0],numOfCard[0])<=16) { hands[0][numOfCard[0]++]=DealOneCard(); ShowStatus(0);
}
cout< if(GetTotalScore(hands[0],numOfCard[0])>21) { for (i=1;i<=numOfPlayer;i++) { if(GetTotalScore(hands[i],numOfCard[i])<=21) { cout< Pla[i].sl++; Pla[i].money=Pla[i].money+Pla[i].yq; Pla[0].money=Pla[0].money-Pla[i].yq; } else { cout< } } } else { for (i=1;i<=numOfPlayer;i++) 26 if(GetTotalScore(hands[i],numOfCard[i])<=21 && GetTotalScore(hands[i],numOfCard[i])>GetTotalScore(hands[0],numOfCard[0])) { cout< Pla[i].sl++; Pla[i].money=Pla[i].money+Pla[i].yq; Pla[0].money=Pla[0].money-Pla[i].yq; } else (GetTotalScore(hands[i],numOfCard[i])==GetTotalScore(hands[0],numOfCard[0])) { cout< } else { cout< Pla[i].money=Pla[i].money-Pla[i].yq; Pla[0].money=Pla[0].money+Pla[i].yq; } } int bz=0,k=0; for(i=1;i<=numOfPlayer;i++) { if(Pla[i].money<=0) { bz=1; k=i; cout< } 27 if if(Pla[0].money>0) { if(bz==0) { for(int x=0;x<=numOfPlayer;x++) cout< goto ks; } if(bz==1) { for(int x=0;x<=numOfPlayer;x++) { cout< } for(int p=1;p<=numOfPlayer;p++) { cout< } } } else { for(int x=0;x<=numOfPlayer;x++) { cout< cout<<\我是特意输给你们的,就当叔叔我给你们的压岁钱!\ { cout< 28 for(int p=1;p<=numOfPlayer;p++) cout<<\局\平了\局\ } #endif utility.h // 实用程序工具包 } } #ifndef __UTILITY_H__ #define __UTILITY_H__ #ifdef _MSC_VER #if _MSC_VER == 1200 // 标准库头文件 #include #include #include #include #include #else // ANSI C++标准库头文件 #include #include // 表示是Visual C++ 表示Visual C++6.0 // 标准串和操作 // 标准流操作 // 极限 数据函数 文件输入输出 // 字符处理 日期和时间函数 // 标准库 // 标准输入输出 输入输出流格式设置 支持变长函数参数 // 支持断言 其它版本的Visual C++ 标准串和操作 // 标准流操作 极限 数据函数 29 // // // // // // // // // // #include // 文件输入输出 // 字符处理 // 日期和时间函数 // 标准库 #include #include // 标准输入输出 // 输入输出流格式设置 // 支持变长函数参数 // 支持断言 #include using namespace std; #endif #else // 标准库包含在命名空间std中 // _MSC_VER == 1200 // 非Visual C++ // ANSI C++标准库头文件 #include // 标准串操作 // 标准流操作 #include // 极限 // 数据函数 // 文件输入输出 // 字符处理 // 日期和时间函数 // 标准库 #include #include // 标准输入输出 // 输入输出流格式设置 // 支持变长函数参数 // 支持断言 #include using namespace std; #endif // 实用函数 // 标准库包含在命名空间std中 // _MSC_VER char GetChar(istream &inStream = cin);// 从输入流inStream中跳过空格及制表符获取一字符 30