游戏
2025-11-28 13:38:26
发布于:浙江
#include<iostream>
#include<windows.h>
using namespace std;
int n;
int main(){
cout<<"打地鼠游戏"<<endl;
cout << "1.简单" << endl;
cout << "2.普通" << endl;
cout << "3.困难" << endl;
cout << "4.地狱" << endl;
cout << "输入对应数字选择难度" << endl;
cin >> n;
cout << "再输一个数,这个数将代表有多少个地鼠" << endl;
cin >> a;
if (n == 1) {
for (int i = 1; i <= a; i++) {
system("start");
Sleep(1000);
}
}
else if (n == 2) {
for (int i = 1; i <= a; i++) {
system("start");
Sleep(700);
}
}
else if (n == 3) {
for (int i = 1; i <= a; i++) {
system("start");
Sleep(500);
}
}
else if (n == 4) {
for (int i = 1; i <= a; i++) {
system("start");
Sleep(300);
}
}
return 0;
}


















有帮助,赞一个