2375| 1
|
剪刀石头布问题,求解答,速进,在线等 |
3鱼币
最佳答案#include
#include
#include
int main(void)
{
char gesture[3][10] = { "scissor", "stone", "cloth" };
int man, computer, result, ret;
srand(time(NULL));
while (1) {
computer = rand() % 3;
printf("\nInput your gesture (0-scissor 1-stone 2-cloth):\n");
ret = scanf("%d", &man);
if (ret != 1 || man < 0 || man > 2) {
printf("Invalid input! Please input 0, 1 or 2.\n");
...
| ||
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
|
||
发表于 2013-12-3 20:20:08
|
显示全部楼层
| ||
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
|
||
小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)
GMT+8, 2024-11-22 20:58
Powered by Discuz! X3.4
© 2001-2023 Discuz! Team.