#include <iostream>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
using namespace std;
int main() {
	srand(time(0));
	int n = 0, left = 1, right = 100, count = 1, ran = rand() % 100 + 1;
	cout << "欢迎来玩数字炸弹!";
	cout << endl;
	Sleep(1000);
	while (true) {
		if (n < left || n > right) {
			
		}
		else {
			if (ran > n) {
				cout << "小了\n";
				left = n;
				count++;
			}
			else if (ran < n) {
				cout << "大了\n";
				right = n;
				count++;
			}
			else {
				cout << "你*了 qwq \n猜数次数:" << count;
				break;
			}
		}
		cout << "输入一个" << left << "到" << right << "的整数:";
		cin >> n;
	}
	cout << "自动退出"; 
	return 0;
}