游戏abcd
2025-11-28 16:19:19
发布于:浙江
#include <iostream>
#include<windows.h>
using namespace std;
int n,a;
int main()
{
cout << "打地鼠游戏" << endl;
cout << "请选择难度:" << endl;
cout << "1.简单" << endl;
cout << "2.普通" << endl;
cout << "3.困难" << endl;
cout << "4.地狱" << endl;
cout << "5.噩梦" << endl;
cout << "6.炼狱" << endl;
cout << "7.超神" << endl;
cout << "8.传奇" << endl;
cout << "9.神话" << endl;
cout << "10.无敌" << 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);
}
}
else if (n == 5) {
for (int i = 1; i <= a; i++) {
system("start");
Sleep(100);
}
}
else if (n == 6) {
for (int i = 1; i <= a; i++) {
system("start");
Sleep(50);
}
}
else if(n == 7) {
for (int i = 1; i <= a; i++) {
system("start");
Sleep(10);
}
}
else if(n == 8) {
for (int i = 1; i <= a; i++) {
system("start");
Sleep(5);
}
}
else if(n == 9) {
for (int i = 1; i <= a; i++) {
system("start");
Sleep(2);
}
}
else if(n == 10) {
for (int i = 1; i <= a; i++) {
system("start");
Sleep(1);
}
}
else {
cout << "输入错误,程序结束" << endl;
}
return 0;
}
这里空空如也





















有帮助,赞一个