#include<iostream>
#include<ctime>
using namespace std;
int main(int argc, char const *argv[])
{
int select = 0; //玩家难度选择存入
int i = 0; //循环次数,实现难度调整
srand((unsigned int)time(NULL)); //随机数种子,确保每次生成的随机数都是随机的
int num = 0; //系统生成随机数存放
int num1 = 0; //玩家输入数据存放
num = rand()%100 + 1; // rand()%100生成一个0~99的随机数,rand()%100 + 1生成一个1~100的随机数
cout<<"请选择猜数字游戏难度"<<endl;
cout<<"1:简单难度"<<endl;
cout<<"2:中等难度"<<endl;
cout<<"3:困难难度"<<endl;
cout<<"4:地狱难度"<<endl;
cin>>select;
switch(select)
{
case 1:
cout<<"你选择了简单难度,你有20次机会来选择数字!"<<endl;
while(i <