#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main() {
int randNum, playerChoice;
// 设置随机数种子为当前时间
srand(time(NULL));
printf("请选择 0(小)或 1(大): ");
scanf("%d", &playerChoice);
printf("请输入1到6之间的骰子点数: ");
scanf("%d", &randNum);
printf("骰子点数为: %d\n", randNum);
if ((playerChoice == 0 && randNum <= 3) || (playerChoice == 1 && randNum >= 4)) {
printf("恭喜你,猜对了!\n");
} else {
printf("很遗憾,猜错了!\n");
}
return 0;
}