C++的井字过三关
答案:3 悬赏:30 手机版
解决时间 2021-11-18 00:52
- 提问者网友:雪舞兮
- 2021-11-17 19:15
C++的井字过三关
最佳答案
- 五星知识达人网友:舍身薄凉客
- 2021-11-17 20:31
char a[] = {1,2,3,4,5,6,7,8,9};
srand(unsigned int(time(0)));
int n = rand()%2;
int d = 8;
//
std::cout<<"begin\n";
while(true)
{
system("cls");
for (int i = 0; i < 9; ++i)
{
std::cout< if(i%3 == 2)std::cout< }
if(0 == n%2)
{
++n;
std::cout<<"people\n";
//
}
else
{
++n;
std::cout<<"computer\n";
int com = rand()%d;
//
}
}
剩下的自己写了
srand(unsigned int(time(0)));
int n = rand()%2;
int d = 8;
//
std::cout<<"begin\n";
while(true)
{
system("cls");
for (int i = 0; i < 9; ++i)
{
std::cout<
if(0 == n%2)
{
++n;
std::cout<<"people\n";
//
}
else
{
++n;
std::cout<<"computer\n";
int com = rand()%d;
//
}
}
剩下的自己写了
全部回答
- 1楼网友:逃夭
- 2021-11-17 22:37
呵呵
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯