- 分享
基础操作系统
- 2025-7-3 19:03:35 @
#include<bits/stdc++.h>
using namespace std;
int i, g, h, k;
int b, c, d, e;
int f[30], a[30];
string j;
void bf() {
system("color 07");
cout << "hello word" << endl << "1*exit" << endl << "2*open my computer" << endl << "3*sleep" << endl << "game"<<endl;
cin >> g;
switch (g) {
case 1:
return;
break;
case 2:
system("cls");
cout << "1*witer txt" << "2*new.txt";
cin >> h;
switch (h) {
case 1:
system("cls");
cin >> j;
bf();
break;
case 2:
system("cls");
cout << j;
cin >> k;
if (k == 1) {
bf();
k = 0;
}
break;
}
break;
case 3:
system("cls");
cin >> k;
if (k == 1) {
bf();
k = 0;
}
break;
case 4:
system("cls");
system("color fa");
srand(time(0));
b = rand() % 50 + 1;
c = rand() % 50 + 1;
d = rand() % 50 + 1;
e = rand() % 50 + 1;
for (int i = 0; i < 30; i++) {
cin >> a[i];
if (a[i] < 1 || 50 < a[i] || a[i] != (int)a[i]) {
system("color c4");
cout << "you did";
}
f[i] = a[i];
if (a[i] == b) {
cout << "you did" << endl;
system("color ce");
system("pause");
system("cls");
i -= 2;
}
if (a[i] == c) {
cout << "win+1" << endl;
system("color de");
system("pause");
system("cls");
i += 5;
}
if (a[i] == d) {
system("color c4");
cout << "you did" << endl;
system("pause");
system("cls");
cout << "win+1:" << c << endl;
cout << "did1:" << b << endl;
cout << "did2:" << d << endl;
cout << "win:" << e << endl;
}
if (a[i] == e) {
cout << "you win" << endl;
system("color e1");
system("pause");
system("cls");
break;
}
cout << "nixt" << endl;
}
cout << "you win" << endl;
system("pause");
system("cls");
cout << "win+1:" << c << endl;
cout << "did1:" << b << endl;
cout << "did2:" << d << endl;
cout << "win:" << e << endl;
break;
}
}
void fun() {
system("color ce");
cout << "#";
system("color de");
system("color c4");
system("color e1");
i++;
if (i < 1000) {
fun();
}
system("cls");
cout << "OK!";
system("pause");
bf();
}
int main() {
fun();
}
3 条评论
-
-
thank you 是你给我的灵感☺☺☺ plus:```language #include<bits/stdc++.h> using namespace std; int i, g, h, k; int b, c, d, e; int f[30], a[30]; string j; void bf() { system("cls"); system("color 17"); cout << "hello word" << endl << "1exit" << endl << "2open my computer" << endl << "3sleep" << endl << "4game" << endl; cin >> g; switch (g) { case 1: return; break; case 2: system("cls"); cout << "1witer txt" << endl << "2new.txt" << endl; cin >> h; switch (h) { case 1: system("cls"); cin >> j; bf(); break; case 2: system("color 17"); system("cls"); cout << j; cin >> k; if (k == 0) { bf(); k = 0; } break; } break; case 3: system("cls"); cin >> k; if (k == 0) { bf(); k = 0; } break; case 4: system("cls"); system("color 17"); srand(time(0)); b = rand() % 50 + 1; c = rand() % 50 + 1; d = rand() % 50 + 1; e = rand() % 50 + 1; for (int i = 0; i < 30; i++) { cin >> a[i]; if (a[i] < 1 || 50 < a[i] || a[i] != (int)a[i]) { system("color c4"); cout << "you did"; bf();
} f[i] = a[i]; if (a[i] == b) { cout << "you did" << endl; system("color ce"); system("pause"); system("cls"); i -= 2; } if (a[i] == c) { cout << "win+1" << endl; system("color de"); system("pause"); system("cls"); i += 5; } if (a[i] == d) { system("color c4"); cout << "you did" << endl; system("pause"); system("cls"); cout << "win+1:" << c << endl; cout << "did1:" << b << endl; cout << "did2:" << d << endl; cout << "win:" << e << endl; } if (a[i] == e) { cout << "you win" << endl; system("color e1"); system("pause"); system("cls"); break; } cout << "nixt" << endl; } cout << "you win" << endl; system("pause"); system("cls"); cout << "win+1:" << c << endl; cout << "did1:" << b << endl; cout << "did2:" << d << endl; cout << "win:" << e << endl; break; }
} void fun() { cout << "#"; system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17"); system("color 17");
i++; if (i < 100) { fun(); } system("cls"); cout << "OK!"; system("pause"); bf();
} int main() { fun(); }//thank you
-
2025-7-3 19:20:33@
中文版:
#include<bits/stdc++.h> using namespace std; int main(){ int b,c,d,e; int f[30],a[30]; system("color fa"); srand(time(0)); b=rand()%50+1; c=rand()%50+1; d=rand()%50+1; e=rand()%50+1; cout<<"**数字炸弹**"<<endl<<"规则:"<<endl<<"1.不能输入比50大的数"<<endl<<"2.不能输入比1小的数"<<endl<<"3.不能输入字母"; for(int i=0;i<30;i++){ cin>>a[i]; if(a[i]<1||50<a[i]||a[i]!=(int)a[i]){ system("color c4"); cout<<"你死了"; return 0; } f[i]=a[i]; for(int j=0;j<30;j++){ if(f[j]==a[i]&&i!=j){ cout<<"不能输入同样的数"<<a[i]<<"!"; i--; } } if(a[i]==b){ cout<<"你抽到炸弹卡了!"<<endl; system("color ce"); system("pause"); system("cls"); i-=2; } if(a[i]==c){ cout<<"恭喜你抽到了神秘道具!"<<endl; system("color de"); system("pause"); system("cls"); i+=5; } if(a[i]==d){ system("color c4"); cout<<"你抽到核弹死了。"<<endl; system("pause"); system("cls"); cout<<"神秘道具是:"<<c<<endl; cout<<"炸弹是:"<<b<<endl; cout<<"核弹是:"<<d<<endl; cout<<"万能卡是:"<<e<<endl; return 0; } if(a[i]==e){ cout<<"你抽到万能卡赢了!"<<endl; system("color e1"); system("pause"); system("cls"); break; } cout<<"你没死!"<<endl; } cout<<"你赢了!"<<endl; system("pause"); system("cls"); cout<<"神秘道具是:"<<c<<endl; cout<<"炸弹是:"<<b<<endl; cout<<"核弹是:"<<d<<endl; cout<<"万能卡是:"<<e<<endl; return 0; }
(这是我编的)
- 1