📄 caiquan.txt
字号:
猜拳游戏
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
enum type{x,jian,bu,chui};
void main()
{
int cop;
int you;
srand(time(NULL));
printf("input your choose:1.jianzi 2.buzi 3.chuizi\n");
scanf("%d",&you);
cop=rand()%3+1;
if(you==cop)
printf("same%d %d\n",cop,you);
else if(you==3&&cop==1)
printf("you win%d %d",cop,you);
else if(cop<you)
printf("computer win");
else printf("you win%d %d",cop,you);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -