2.(NUMBER-BOOM!!!)

#include <bits/stdc++.h>
#include<windows.h>
using namespace std;
long long a, b = 100, c = 1, d, e, g = 0, k = 0;
string l, f;
int main() {
	srand(time(0));
	
	cout << "               " << "数字炸弹" << endl;
	cout << "输入你的ID" << endl;
	cin >> f;
	system("cls");
	for (;;) {
		system("cls");
		cout << "欢迎" << f << "来到数字炸弹游戏,如果你赢了你就会拿到100万。" << endl;
		cout << "              " << "1.开始游戏" << endl;
		cout << "              " << "2.退出游戏" << endl;
		cout << "                           " << "胜利次数:" << g << endl;
		cout << "                           " << "失败次数:" << k << endl;
		cin >> d;
		if (d == 1) {
			system("cls");
			cout << "输入数字吧" << endl;
		} else if (d == 2) {
			system("cls");
			
			cout << "白白" << endl;
			Sleep(100);
			break;
		} else if (d != 1 && d != 2) {
			cout << "错误" << endl;
			Sleep(100);
			break;
		}
		long long p = rand() % 4 + 1;
		if (p == 4) {
			l = "电脑之神";
		}
		if (p == 1) {
			l = "QAQ";
		}
		if (p == 2) {
			l = "我的世界64648";
		}
		if (p == 3) {
			l = "大佬";
		}
		long long o = rand() % 4;
		system("cls");
		for (int i = 1; i <= o; i++) {
			cout << "正在匹配";
			Sleep(500);
			cout << "。";
			Sleep(500);
			cout << "。";
			Sleep(500);
			cout << "。";
			Sleep(500);
			cout << "。";
			Sleep(500);
			cout << "。";
			Sleep(500);
			cout << "。";
			Sleep(500);
			system("cls");
		}
		long long n = rand() % 4;
		system("cls");
		for (int i = 1; i <= n; i++) {
			cout << "正在加载";
			Sleep(500);
			cout << "。";
			Sleep(500);
			cout << "。";
			Sleep(500);
			cout << "。";
			Sleep(500);
			cout << "。";
			Sleep(500);
			cout << "。";
			Sleep(500);
			cout << "。";
			Sleep(500);
			system("cls");
		}
		long long x = rand() % 100;
		for (;;) {
			cout << f << ":";
			cin >> a;
			cout << endl;
			if (a <= c || a >= b) {
				cout << "输入" << c << "到" << b << "之间的数" << endl;
				continue;
			}
			if (a == x) {

				cout << "bong,你被炸死了" << endl;
				k++;
				long long x = rand() % 100;
				Sleep(100);
				break;
			}

			if (a < x) {
				c = a;
			}

			if (a > x) {
				b = a;
			}
			cout << c << "到" << b << "中选一个数" << endl;
			cout << endl;
			long long j = rand() % (b - c) + c;
			cout << l << ":" << j << endl;
			cout << endl;
			if (j == x) {

				cout << "bong,"<<l<<"被炸死了" << endl;
				cout << endl;
				long long x = rand() % 100;
				g++;
				Sleep(100);
				break;
			}
			if (j < x) {
				c = j;
			}

			if (j > x) {
				b = j;
			}

			cout << c << "到" << b << "中选一个数" << endl;

			cout << endl;
		}
	}
	return 0;
}


``