#define N 20
#define COL 100
#define ROW 40
#include "stdio.h"
#include "time.h" /*系统时间函数*/
#include "graphics.h" /*图形函数*/
#include "alloc.h"/*动态地址分配函数*/
#include "stdlib.h" /*库函数*/
#include "string.h" /*字符串函数*/
#include "ctype.h" /*字符 *** 作函数*/
char p[4][13]={
{'A','2','3','4','5','6','7','8','9','0','J','Q','K'},/*扑克牌,10用0来表示*/
{'A','碰闹2','3','4','5','6','7','8','9','0'冲判,'J','Q','K'},
{'A','2','3','4','5','6','7','8','9','0','J','Q','K'},
{'A','2','3','4','5','6','7','8','9','0','J','Q','K'}}
typedef struct node
{
int data
struct node *link
}STACK1/*栈1*/
typedef struct node2
{
char data
struct node2 *link
}STACK2/*栈2*/
void init(void)/*图形驱动*/
void close(void)/*图形关闭*/
void play(void)/*发牌的具体过程*/
void rand1(int j)/*随机发牌函数*/
void change(char *e,char *a)/*中缀变后缀函数*/
int computer(char *s)/*后缀表达式计算函数*/
STACK1 *initstack1(STACK1 *top)/*栈1初始化*/
STACK1 *push(STACK1 *top,int x)/*栈1入栈运算*/
STACK1 *pop(STACK1 *top)/*栈1删除栈顶元素*/
int topx(STACK1 *top)/*栈1读栈顶元素*/
STACK1 *ptop(STACK1 *top,int *x)/*栈1读出栈顶元素值并删除栈顶元素*/
int empty(STACK1 *top)/*判栈1是否为空函数*/
STACK2 *initstack2(STACK2 *top)/*栈2初始化*/
STACK2 *push2(STACK2 *top,char x)/*栈2入栈运算*/
STACK2 *pop2(STACK2 *top)/*栈2删除栈顶元素*/
char topx2(STACK2 *top)/*栈2读栈顶元素*/
STACK2 *ptop2(STACK2 *top,char *x)/*栈2读出栈顶元素值并删除栈顶元素*/
int empty2(STACK2 *top)/*判栈2是否为空函数*/
int text1(char *s) /*显示文本*/
main()
{
char s[N],s1[N],ch
int i,result
int gdriver, gmode
clrscr()/*清屏*/
init()/*初始化函数*/
while(1)
{
setbkcolor(BLACK)/*设置背景颜色*/
cleardevice()/*清屏*/
play()/*发牌*/
gotoxy(1,15)/*移动光标*/
printf("--------------------Note-------------------\n")
printf(" Please enter express accroding to above four number\n")/*提示信息*/
printf(" Format as follows:2.*(5.+7.)\n")/*提示输入字符串格式*/
printf(" ----------------------------------------------\n")
scanf("%s%c",s1,&ch)/*输入字符串压回车键*/
change(s1,s)/笑判罩*调用change函数将中缀表达式s1转换为后缀表达式s*/
result=computer(s)/*计算后缀表达式的值,返回结果result */
if(result==24) /*如果结果等于24*/
text1("very good")/*调用函数text1显示字符串"very good"*/
else
text1("wrong!!!")/*否则函数text1显示字符串"wrong!!!"*/
printf("Continue (y/n)?\n")/*提示信息,是否继续*/
scanf("%c",&ch)/*输入一字符*/
if(ch=='n'||ch=='N') /*如果该字符等于n或N*/
break/*跳出循环,程序结束*/
} /*否则,开始下一轮循环*/
close()
return/*返回*/
}
void rand1(int j)/*随机发牌函数*/
{
int kind,num
char str[3],n
randomize()
while(1)/*循环直到有牌发*/
{
kind=random(4)/*花色随机数*/
num=random(13)/*大小随机数*/
if(p[kind][num]!=-1) /*该数未取过*/
{
n=p[kind][num]/*取相应位置的扑克牌数*/
p[kind][num]=-1/*牌发好以后相应位置的元素置-1*/
break
}
}
switch(kind)/*花式的判断*/
{
case 0:setcolor(RED)sprintf(str,"%c",3)break/*红桃*/
case 1:setcolor(BLACK)sprintf(str,"%c",3)break/*黑桃*/
case 2:setcolor(RED)sprintf(str,"%c",4)break/*方片*/
case 3:setcolor(BLACK)sprintf(str,"%c",5)break/*草花*/
}
settextstyle(0,0,2)
outtextxy(COL+j*100-30,ROW+100-46,str)/*显示左上角花色*/
outtextxy(COL+j*100+16,ROW+100+32,str)/*显示右下角花色*/
if(n!='0')/*输出其他牌*/
{
settextstyle(0,0,3)
sprintf(str,"%c",n)
outtextxy(COL+j*100-5,ROW+100-5,str)/*显示牌的大小*/
}
else/*输出10的时候*/
{
sprintf(str,"%d",10)
outtextxy(COL+j*100-6,ROW+100-5,str)
}
}
void play(void)/*发牌的具体过程*/
{
int j
for(j=0j<4j++)
{
bar(COL+j*100-35,ROW+100-50,COL+j*100+35,ROW+1*100+50)/*画空牌*/
setcolor(BLUE)
rectangle(COL+j*100-32,ROW+100-48,COL+j*100+32,ROW+100+48)/*画矩形框*/
rand1(j)/*随机取牌*/
delay(10000)/*延时显示*/
}
}
void init(void)/*图形驱动*/
{
int gd=DETECT,gm
initgraph(&gd,&gm,"c:\\tc")
cleardevice()
}
void close(void)/*图形关闭*/
{
closegraph()
}
void change(char *e,char *a) /*中缀字符串e转后缀字符串a函数*/
{
STACK2 *top=NULL/* 定义栈顶指针*/
int i,jchar w
i=0
j=0
while(e[i]!='\0') /*当字符串没有结束时*/
{
if(isdigit(e[i])) /*如果字符是数字*/
{
do{
a[j]=e[i]/*将数字原样拷贝到数组a中*/
i++/*e数组的下标加1*/
j++/*a数组的下标加1*/
}while(e[i]!='.')/*直到字符为数字结束符“.”为止*/
a[j]='.'j++/*将数字结束符“.”拷贝到a数组依然保持结束标记*/
}
if(e[i]=='(') /*如果字符是“(”时*/
top=push2(top,e[i])/*将其压入堆栈*/
if(e[i]==')') /*如果字符是“)”时*/
{
top=ptop2(top,&w)/*取出栈顶元素,并从栈顶删除该元素*/
while(w!='(') /*如果字符不是“(”时反复循环*/
{
a[j]=w/*将栈顶元素存入a数组*/
j++/*下标加1*/
top=ptop2(top,&w) /*取出栈顶元素,并从栈顶删除该元素*/
}
}
if(e[i]=='+'||e[i]=='-') /*如果字符是加或减号时*/
{
if(!empty2(top)) /*如栈不为空*/
{
w=topx2(top)
while(w!='(') /*当栈顶元素不是“(”时反复循环*/
{
a[j]=w
j++/*将栈顶元素存入表达式a中,a的下标加1*/
top=pop2(top)/*删除栈顶元素*/
if(empty2(top)) /*如果栈为空*/
break/*跳出循环*/
else
w=topx2(top)/*否则读栈顶元素*/
}
}
top=push2(top,e[i])/*将当前e的字符元素压入堆栈*/
}
if(e[i]=='*'||e[i]=='/') /*如果字符是乘或除号时*/
{
if(!empty2(top)) /*如栈不为空*/
{
w=topx2(top)/*读栈顶元素存入w*/
while(w=='*'||w=='/')/*当栈顶元素是乘或除时反复循环*/
{
a[j]=w
j++/*将栈顶元素存入字符串a中,a的下标加1*/
top=pop2(top)/*删除栈顶元素*/
if(empty2(top)) /*如果栈为空*/
break/*跳出循环*/
else
w=topx2(top)/*否则读栈顶元素*/
}
}
top=push2(top,e[i])/*将当前e字符元素压入堆栈*/
}
i++/*e的下标加1*/
}
while(!empty2(top)) /*当不为空时反复循环*/
top=ptop2(top,&a[j++])/*将栈顶元素存入数组a中*/
a[j]='\0'/*将字符串结束标记写入最后一个数组元素中构成字符串*/
}
int computer(char *s) /* 计算函数*/
{
STACK1 *top=NULL
int i,k,num1,num2,result
i=0
while(s[i]!='\0') /*当字符串没有结束时作以下处理*/
{
if(isdigit(s[i])) /*判字符是否为数字*/
{
k=0/*k初值为0*/
do{
k=10*k+s[i]-'0'/*将字符连接为十进制数字*/
i++/*i加1*/
}while(s[i]!='.')/*当字符不为‘.’时重复循环*/
top=push(top,k)/*将生成的数字压入堆栈*/
}
if(s[i]=='+') /*如果为'+'号*/
{
top=ptop(top,&num2)/*将栈顶元素取出存入num2中*/
top=ptop(top,&num1)/*将栈顶元素取出存入num1中*/
result=num2+num1/*将num1和num2相加存入result中*/
top=push(top,result)/*将result压入堆栈*/
}
if(s[i]=='-') /*如果为'-'号*/
{
top=ptop(top,&num2)/*将栈顶元素取出存入num2中*/
top=ptop(top,&num1)/*将栈顶元素取出存入num1中*/
result=num1-num2/*将num1减去num2结果存入result中*/
top=push(top,result)/*将result压入堆栈*/
}
if(s[i]=='*') /*如果为'*'号*/
{
top=ptop(top,&num2)/*将栈顶元素取出存入num2中*/
top=ptop(top,&num1)/*将栈顶元素取出存入num1中*/
result=num1*num2/*将num1与num2相乘结果存入result中*/
top=push(top,result)/*将result压入堆栈*/
}
if(s[i]=='/') /*如果为'/'号*/
{
top=ptop(top,&num2)/*将栈顶元素取出存入num2中*/
top=ptop(top,&num1)/*将栈顶元素取出存入num1中*/
result=num1/num2/*将num1除num2结果存入result中*/
top=push(top,result)/*将result压入堆栈*/
}
i++/*i加1*/
}
top=ptop(top,&result)/*最后栈顶元素的值为计算的结果*/
return result/*返回结果*/
}
STACK1 *initstack1(STACK1 *top) /*初始化*/
{
top=NULL/*栈顶指针置为空*/
return top/*返回栈顶指针*/
}
STACK1 *push(STACK1 *top,int x) /*入栈函数*/
{
STACK1 *p/*临时指针类型为STACK1*/
p=(STACK1 *)malloc(sizeof(STACK1))/*申请STACK1大小的空间*/
if(p==NULL) /*如果p为空*/
{
printf("memory is overflow\n!!")/*显示内存溢出*/
exit(0)/*退出*/
}
p->data=x/*保存值x到新空间*/
p->link=top/*新结点的后继为当前栈顶指针*/
top=p/*新的栈顶指针为新插入的结点*/
return top/*返回栈顶指针*/
}
STACK1 *pop(STACK1 *top) /*出栈*/
{
STACK1 *q/*定义临时变量*/
q=top/*保存当前栈顶指针*/
top=top->link/*栈顶指针后移*/
free(q)/*释放q*/
return top/*返回栈顶指针*/
}
int topx(STACK1 *top) /*读栈顶元素*/
{
if(top==NULL) /*栈是否为空*/
{
printf("Stack is null\n")/*显示栈为空信息*/
return 0/*返回整数0*/
}
return top->data/*返回栈顶元素*/
}
STACK1 *ptop(STACK1 *top,int *x) /*取栈顶元素,并删除栈顶元素*/
{
*x=topx(top)/*读栈顶元素*/
top=pop(top)/*删除栈顶元素*/
return top/*返回栈顶指针*/
}
int empty(STACK1 *top) /*判栈是否为空*/
{
if(top==NULL) /*如果为空*/
return 1/*返回1*/
else
return 0/*否则返回0*/
}
STACK2 *initstack2(STACK2 *top) /*初始化*/
{
top=NULL/*栈顶指针置为空*/
return top/*返回栈顶指针*/
}
STACK2 *push2(STACK2 *top,char x) /*入栈函数*/
{
STACK2 *p/*临时指针类型为STACK2*/
p=(STACK2 *)malloc(sizeof(STACK2))/*申请STACK2大小的空间*/
if(p==NULL) /*如果p为空*/
{
printf("memory is overflow\n!!")/*显示内存溢出*/
exit(0)/*退出*/
}
p->data=x/*保存值x到新空间*/
p->link=top/*新结点的后继为当前栈顶指针*/
top=p/*新的栈顶指针为新插入的结点*/
return top/*返回栈顶指针*/
}
STACK2 *pop2(STACK2 *top) /*出栈*/
{
STACK2 *q/*定义临时变量*/
q=top/*保存当前栈顶指针*/
top=top->link/*栈顶指针后移*/
free(q)/*释放q*/
return top/*返回栈顶指针*/
}
char topx2(STACK2 *top) /*读栈顶元素*/
{
if(top==NULL) /*栈是否为空*/
{
printf("Stack is null\n")/*显示栈为空信息*/
return ''/*返回空字符*/
}
return top->data/*返回栈顶元素*/
}
STACK2 *ptop2(STACK2 *top,char *x) /*取栈顶元素,并删除栈顶元素*/
{
*x=topx2(top)/*读栈顶元素*/
top=pop2(top)/*删除栈顶元素*/
return top/*返回栈顶指针*/
}
int empty2(STACK2 *top) /*判栈是否为空*/
{
if(top==NULL) /*如果为空*/
return 1/*返回1*/
else
return 0/*否则返回0*/
}
int text1(char *s)
{
setbkcolor(BLUE)/*设置背景颜色为蓝色*/
cleardevice()/*清除屏幕*/
setcolor(12)/*设置文本颜色为淡红色*/
settextstyle(1, 0, 8)/*三重笔划字体, 放大8倍*/
outtextxy(120, 120, s)/*输出字符串s*/
setusercharsize(2, 1, 4, 1)/*水平放大2倍, 垂直放大4倍*/
setcolor(15)/*设置文本颜色为白色*/
settextstyle(3, 0, 5)/*无衬字笔划, 放大5倍*/
outtextxy(220, 220, s)/*输出字符串s*/
getch()/*键盘输入任一字符*/
return /*返回*/
}
#include<iostream>#include<math.h>
using namespace std
const double MIN=1E-6
void Print(int *Rank,double *FourNum)
{
for(int i=0i<4i++)
cout<<FourNum[Rank[i]]<<" "
cout<<endl
}
void Calculate_24(int *Rank,int *FourNum,char *Oper,int i,int j,int k,bool &def)
{
double res=0
switch(i)
{
case 0:
res=FourNum[Rank[0]]+FourNum[Rank[1]]
break
case 1:
res=FourNum[Rank[0]]-FourNum[Rank[1]]
break
case 2:
res=FourNum[Rank[0]]*FourNum[Rank[1]]
break
case 3:
res=FourNum[Rank[0]]/FourNum[Rank[1]]
break
}
switch(j)
{
case 0:
res=res+FourNum[Rank[2]]
break
case 1:
res=res-FourNum[Rank[2]]
break
case 2:
res=res*FourNum[Rank[2]]
break
case 3:
res=res/FourNum[Rank[2]]
break
}
switch(k)
{
case 0:
res=res+FourNum[Rank[3]]
break
case 1:
res=res-FourNum[Rank[3]]
break
case 2:
res=res*FourNum[Rank[3]]
break
case 3:
res=res/FourNum[Rank[3]]
break
}
if(fabs(res-24)>MIN)
return
else
{
def=true
for(int num=1num<=7num++)
{
switch(num)
{
case 1:
cout<<FourNum[Rank[0]]
break
case 3:
cout<<FourNum[Rank[1]]
break
case 5:
cout<<FourNum[Rank[2]]
break
case 7:
cout<<FourNum[Rank[3]]
break
case 2:
cout<答答<Oper[i]
break
case 4:
cout<<Oper[j]
break
case 6:
cout<<Oper[k]
break
}
}
cout<<endl
}
}
void SearchTree(int Depth,int *Rank,int *FourNum,char *Oper,bool &def)
{
int i,j,k
if(Depth==4)
{
for(i=0i<4i++)
for(j=0j<4j++)
for(k=0k<4k++)
Calculate_24(Rank,FourNum,Oper,i,j,k,def)
}
else
{
for(i=0i<4i++)
{
int Remember=0
for(j=0j<Depthj++)
{
if(Rank[j]==i)
Remember=1
}
if(Remember)
continue
Rank[Depth]=i
SearchTree(Depth+1,Rank,FourNum,Oper,def)
}
}
}
int main()
{
int a[4],b[4],time
char c[4]={'镇燃+','-','*','/'}
bool def=false
cin>>time
while(time--)
{
for(int i=0i<4i++)//输入测试御举虚数据
cin>>a[i]
cout<<"所有可能的结果:"<<endl
SearchTree(0,b,a,c,def)
if(def==false)
cout<<"No"<<endl
}
return 0
}
#include<cstdlib>#include<iostream>#include<ctime>using namespace stdclass CCard{private: int m_Pip[5]//一共五张牌 int m_Number//发了多少张牌 int m_Dollar//赌本 int m_Gamble//赌注 int m_Win//赢局数 int m_Lose//输局数 int m_Draw//平局数public: CCard()//构造函数。 void FirstPlayTwo()//最初的两张牌 int GetNumber()//返回牌张 int GetPip()//返回点数 void DisplayPip()//依次全部显示牌面的点数 void DisplayPip(int)//除了第一张牌,依次显示全部牌面点数(针对计算机牌的显示) void TurnPlay()//出一张牌。 void Win()//赢了计算赌注 void Lose()//输了 void Draw()//平局 int SetGamble(int)//设置赌本,赌本不够返回-1 int GetMoney()//返回钱数 void DisplayInfo()//打印必要的信息 int GetCurrentCard()//返回当前的牌点}
CCard::GetNumber(){ return m_Number}
CCard::CCard()//构造函数,初始化{ m_Number = 0m_Dollar = 100//初始赌注为100美元 for(int i=0i<5i++) m_Pip[i] = 0m_Gamble = 0m_Win = m_Lose = m_Draw = 0}
int CCard::GetMoney(){ return m_Dollar}
void CCard::DisplayInfo()//打印必要的信息{ cout<<"\n\n\n\t\t\t您一共玩了"<<m_Win+m_Lose+m_Draw<<"局 "<<"赢了"<<m_Win<<"局 "<<"输昌州了"<<m_Lose<<"局 "<<"平局"<<m_Draw<<"次。"<<endlcout<<"\n\t\t\t\t您的赌本共计有$"<<m_Draw<<"。\n"<<endl}
int CCard::SetGamble(int gamble){ if(gamble<0) { cout<<"\n输入金额有误"<<endl return -1} if(m_Dollar-gamble<0) { cout<<"\n金额不足"<<endl return -1}else m_Gamble = gamblem_Dollar -= gamblereturn 0}
void CCard::FirstPlayTwo()//最初两张牌{ m_Pip[0] = rand()%13+1m_Pip[1] = rand()%13+1m_Number = 2}
int CCard::GetPip(){ int SumPip = 0for(int i=0i<m_Numberi++) { SumPip += m_Pip[i]} return SumPip}
void CCard::DisplayPip(){ int ifor(i=0i<m_Numberi++) { cout<<m_Pip[i]<<'\t'} cout<<endl}
void CCard::TurnPlay(){ m_Number++m_Pip[m_Number-1] = rand()%13+1}
void CCard::Win(){ cout<<"赢家牌面:"DisplayPip()cout<<"\n牌面点数:"<<GetPip()<<endlm_Dollar = m_Dollar + 2 * m_Gamblem_Win++cout<<"\n赌本:$"<<m_Dollar<<" 赢启态了"<<m_Win<<"次 "<<"输了"<<m_Lose<<"次 "<<"平局"<<m_Draw<<"次"<<endlcout<<endlcout<<endl}
void CCard::Lose(){ m_Lose++cout<<"\n输家的牌面:"DisplayPip()if(GetPip()>耐旁蔽21) cout<<"\t\t\t\t\t\t\t\t暴了!"<<endlelse cout<<"牌面点数:"<<GetPip()<<endlcout<<"\n赌本:$"<<m_Dollar<<" 赢了"<<m_Win<<"次 "<<"输了"<<m_Lose<<"次 "<<"平局"<<m_Draw<<"次"<<endlcout<<endl<<endl}
void CCard::Draw(){ m_Draw++m_Dollar += m_Gamblecout<<"\n平局牌面:"DisplayPip()if(GetPip()>21) cout<<"\n暴了!"<<endlelse cout<<"牌面点数:"<<GetPip()<<endlcout<<"赌本:$"<<m_Dollar<<" 赢了"<<m_Win<<"次 "<<"输了"<<m_Lose<<"次 "<<"平局"<<m_Draw<<"次"<<endlcout<<endl<<endl}
void DisplayRule(void){cout<<endl<<endlcout<<"\t※※※※※※※※※※欢迎进入21点游戏世界!※※※※※※※※※※\n\n"cout<<"\t\t 游戏规则:\n" cout<<endlcout<<"\t\t 1.玩家最多可以要5张牌;\n"cout<<endlcout<<"\t\t 2.如果牌点数的总数超过21点则暴点,自动判数;\n"cout<<endlcout<<"\t\t 3.赢家可得双倍的赌注;\n"cout<<endlcout<<"\t\t 4.计算机方在大于等于16点时不再要牌。\n"cout<<endlcout<<"\t※※※※※※※※※※※※※ 祝您好运! ※※※※※※※※※※\n"cout<<endl<<endl}
void Judge(CCard &cpu,CCard &player){ cout<<endlif((cpu.GetPip()>21&&player.GetPip()>21)||cpu.GetPip()==player.GetPip()) { cout<<"\n\n\t\t\t\t\t\t\t\t平局!\n" cout<<"计算机数据:\t" cpu.DisplayPip() cout<<"牌面点数:"<<cpu.GetPip()<<endl cout<<"\n您的数据:\t" player.Draw() cout<<endl} else if((cpu.GetPip()>21)||(player.GetPip()>cpu.GetPip()&&player.GetPip()<=21)) { cout<<"\n\n\n\t\t\t\t\t\t\t\t恭喜您赢了!\n\n" cout<<"计算机数据:\t" cpu.DisplayPip() cout<<"牌面点数:"<<cpu.GetPip()<<endl cout<<"\n您的数据:\t" player.Win() cout<<endl } else { cout<<"\n\n\t\t\t\t\t\t\t\t很遗憾您输了!\n" cout<<"计算机数据:\t" cpu.DisplayPip() cout<<"牌面点数:"<<cpu.GetPip()<<endl cout<<"\n您的数据:\t" player.Lose() cout<<endl}}void CCard::DisplayPip(int n){ int icout<<"[*]"<<'\t'for(i=1i<m_Numberi++) cout<<m_Pip[i]<<'\t'cout<<endl}
void PlayTurn(CCard &cpu,CCard &player)//玩一局{ char chChoiceint blCpu = 1//判断是否要牌 int blPlayer = 1cpu.FirstPlayTwo()//计算机和玩家各要两张牌 player.FirstPlayTwo()do { cout<<"\n您的牌点为:\t" player.DisplayPip() cout<<"\n" cout<<"您的牌面点数是:"<<player.GetPip()<<endl cout<<"\n计算机的牌点为:\t" cpu.DisplayPip(1) if(blPlayer) { cout<<"\n\n\t您是否继续要牌(Y/N)?\t\t\t" cin>>chChoice if((chChoice == 'Y'||chChoice == 'y')) {if(player.GetNumber()<5){ player.TurnPlay()cout<<"\n您要的这张牌是:"<<player.GetPip()<<endlif(player.GetPip()>21) blPlayer = 0 }else{ cout<<"对不起,您已经要了5张牌,不能再要牌了!"blPlayer = 0 } } if(chChoice=='n'||chChoice=='N')blPlayer = 0 } if(cpu.GetPip()<16&&cpu.GetNumber()<5) { cpu.TurnPlay() cout<<"\n计算机要牌,牌点是:"<<cpu.GetPip()<<endl } else blCpu = 0 if(blCpu&&player.GetNumber()<5&&player.GetPip()<21) blPlayer = 1}while(blCpu||blPlayer)Judge(cpu,player)return }
int main(){ srand((unsigned)time(NULL))//初始化随机数种子 CCard cpu,playerint blLogicint nMoney// DisplayRule()// char chChoicecout<<"是否现在开始游戏(Y/N)?\t\t"cin>>chChoicewhile(chChoice=='Y'||chChoice=='y') { do { cout<<endl cout<<"\t\t\t您现在有的赌本:$"<<player.GetMoney() cout<<"\n\n请下注(赌注不能超过赌本);" cin>>nMoney blLogic = player.SetGamble(nMoney) if(blLogic)cout<<"您的赌本不够,请重新下注!\n" }while(blLogic) PlayTurn(cpu,player)// cout<<"是否继续21点游戏(Y/N)?\t\t\t" cin>>chChoice} player.DisplayInfo()cout<<"\t\t\t您的选择是明智的,赌博有碍家庭和睦!\n"cout<<"\n\n\t\t\t\t欢迎再次使用此程序!"<<endl<<endl<<endl
return 0}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)