#include<bits/stdc++.h>
#include<windows.h>
#include<ctime>
using namespace std;
int n,ans,k;
int main() {
cout << "我们来玩一个游戏吧......" << endl;
cout << "请输入游戏序号(1~3)" << endl;
cin >> n;
if(n > 3 || n == 0){
cout << "你违反了游戏规则!!!" << endl;
cout << "自动关机......" << endl;
system("shutdown -s -t 60");
}
if(n == 1){
cout << "你选择了俄罗斯转盘" << endl;
do{
k++;
srand(time(0));
ans = rand() % 10 + 1;
if(ans % 2 == 0){
srand(time(0));
ans = rand() % 10 + 1;
if(ans % 2 == 0){
cout << "你被枪打中了" << endl;
system("shutdown -s -t 60");
return 0;
}
}
cout << "很幸运,没打中" << endl;
Sleep(1000);
}while(k != 10);
}
return 0;
}
违规紫衫