#include <stdio.h>
int main()
{
int number, n;
int count = 0;
int value;
scanf("%d%d", &number, &n);
while(count <= n) {
scanf("%d", &value);
if(value < 0) {
printf("Game Over\n");
break;
}
++count;
if(value > number)
printf("Too big\n");
else if(value < number)
printf("Too small\n");
else {
if(count == 1)
printf("Bingo!\n");
else if(count <= 3)
printf("Lucky You!\n");
else if(count <= n)
printf("Good Guess!\n");
break;
}
}
if(count > n)
printf("Game Over\n");
return 0;
}
4-4. 猜数字游戏(15)
最新推荐文章于 2024-10-07 18:19:26 发布