早教吧 育儿知识 作业答案 考试题库 百科 知识分享

求程序,下面是剪刀石头布的程序,谁能帮忙改成能选择三局两胜,五局三胜……的?能成功运行的加分#include#includeusingnamespacestd;classPlay{public:intPeople;unsignedlongComputer;public:Play(){};Play(){};voidSe

题目详情
求程序,下面是剪刀石头布的程序,谁能帮忙改成能选择三局两胜,五局三胜……的?能成功运行的加分
#include
#include
using namespace std;
class Play
{
public:
int People;
unsigned long Computer;
public:
Play(){};
Play(){};
void Set_People(int _p)
{
People=_p;
}
void Set_Computer(unsigned long _C)
{
Computer=_C;
}
int Judge()
{
switch(People)
{
case 0:
cout
▼优质解答
答案和解析
#include
#include
using namespace std;
class Play
{
public:
int People;
unsigned long Computer;
public:
Play(){};
~Play(){};
void Set_People(int _p)
{
People=_p;
}
void Set_Computer(unsigned long _C)
{
Computer=_C;
}
int Judge()
{
switch(People)
{
case 0:
cout