#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main(){
int mynumber,n,yournumber,i;
srand(time(0));
mynumber=rand()%10+1;//随机1-10的整数
// printf("Enter mynumber:");
// scanf("%d",&mynumber);
printf("Enter number of time:");//提示输入可猜测次数
scanf("%d",&n);
for(i=1;i<=n;i++){
printf("Enter yournumber:");//提示输入可猜测数
scanf("%d",&yournumber);
if(i==1&&mynumber==yournumber) {
printf("Bingo!\n");break;
}
else if(i<=3&&mynumber==yournumber) {
printf("Lucky you!\n");break;
}
else if(i<=n&&mynumber==yournumber) {
printf("Good Guess!\n");break;
}
else if(i>=n&&mynumber!=yournumber) {
printf("Game Over!\n");break;
}
if(yournumber<0) { //中途输入负数游戏结束
printf("Game Over!\n");break;
}
}
return 0;
}