【c++】游戏作品分享

 c++代码

#include <bits/stdc++.h>
#include <xiaohoucode.h>
#include<time.h>
#include<stdlib.h>
#include <unistd.h>
#include <termio.h>
#include <ctype.h>
#include <stdio.h>
#include<math.h>
using namespace std;
int cnt1=0;
int cnt2=0;
bool andchachengchu(int a1)
{
    while (cnt1!=10)
    {
    	
    	cnt1++;
        srand((unsigned int)time(NULL));
        int a = rand() % 100 + 1;
        int b = rand() % 100 + 1;
        int c = rand() % 4 + 1;
        if (c == 1)
        {
            int da = a + b;
            cout << a << " + " << b << " = ";
            int n;
            cin >> n;
            if (n == da)
            {
                cout << "对了" << endl;
                cnt2++;
            }
            else
            {
                cout << "错了" << endl;
            }
        }
        if (c == 2)
        {
            int da = a + b;
            cout << a << " + " << b << " = ";
            int n;
            cin >> n;
            if (n == da)
            {
                cout << "对了" << endl;
                cnt2++;
            }
            else
            {
                cout << "错了" << endl;
            }
        }
        if (c == 3)
        {
            double da = a * b;
            cout << a << " * " << b << " = ";
            int n;
            cin >> n;
            if (n == da)
            {
                cout << "对了" << endl;
                cnt2++;
            }
            else
            {
                cout << "错了" << endl;
            }
        }
        if (c == 4)
        {
            if (a < b)
            {
                int temp = a;
                a = b;
                b = temp;
            }
            bool flag = false;
            for (int i = a; i >= 1; i--)
            {
                for (int j = b; j >= 1; j--)
                {
                   if (i % j == 0)
                   {
                       flag = true;
                       a = i;
                       b = j;
                       break;
                   }
                }
                if (flag)
                {
                    break;
                }
            }
            double da = a * 1.0 / b;
            cout << a << " / " << b << " = ";
            double n;
            cin >> n;
            if (n == da)
            {
                cout << "对了" << endl;
                cnt2++;
            }
            else
            {
                cout << "错了" << endl;
            }
        }
        
    }
    
}
int health1 = 5, health2 = 5;
int power1 = 0, power2 = 0;
int cnt = 0;
void intro1()
{
    srand(time(NULL));
    cout << endl << endl;
    cout << "两人回合制游戏,每回合双方同时在“攻击、防御、集气、必杀”四种行动中选一种。" << endl << endl;
    // 补充游戏介绍函数
    cout << "两人回合制游戏,每回合双方同时在“攻击、防御、集气、必杀”四种行动中选一种。" << endl << endl;
    cout << "1. “生命”:每人 5 点生命,生命归 0 立即死亡;" << endl << endl;
    cout << "2. “伤害”:攻击造成 1 伤害,防御免除攻击伤害,互相攻击双方都不受伤害,必杀造成 3 伤害;" << endl << endl;
    cout << "“必杀”:必杀需消耗 2“气”,双方同时必杀则相安无事,否则放必杀者造成伤害,对手的行动无任何效果;" << endl << endl;
    cout << "4. “气”:防御对方攻击增加 1 气,集气且不受到伤害增加 1 气。" << endl << endl;
    cout << "----------单挑开始,你是武将1,电脑指挥武将2----------" << endl << endl;
}
// 人的策略函数
namespace human
{
    int strategy()
    {
        // 输出出卡提示
        cout << "用数字代表本回合武将1的行动:1攻击,2防御,3集气,4必杀" << endl;
        // 读入人的策略
        int x;
        cin >> x;
        return x;
    }
}
// 片段4 确定电脑策略
// 确定电脑策略
namespace ai
{
    int strategy()
    {
        //补充函数:产生1~3的随机数,并返回
        if (power2 >= 2)return 4;
        {
            return rand() % 3 + 1;
        }
    }
}
//片段5 根据双方行动, 执行一回合的对战
bool fight(int d1, int d2)
{ 
    if (d1 < 1 || d1 > 4)
    {
        cout << "【【【武将1没有这种策略啦~重新开始回合" << cnt << "!】】】" << endl;
        return true;  
    }          
    if ((d1 == 4 && power1 < 2))
    {
        cout << "【【【武将1不够气来放必杀!重新开始回合" << cnt << "!】】】" << endl;
        return true;     
    }
    cout << "【【【" ;
    if (d1 == 1 && d2 == 1)
    {
        cout << "两人同时攻击,相安无事";
    }
    if (d1 == 1 && d2 == 2)
    {
        power2++;
        cout << "武将2防御了武将1的攻击,得1气";
    }
    if (d1 == 2 && d2 == 1)
    {
        power1++;
        cout << "武将1防御了武将2的攻击,得1气";
    }
    if (d1 == 2 && d2 == 2)
    {
        cout << "两人同时防御,相安无事";
    }
    if (d1 == 1 && d2 == 3)
    {
        health2--;
        cout << "武将2集气时受到武将1的攻击,损失1生命";
    }
    if (d1 == 3 && d2 == 1)
    {
        health1--;
        cout << "武将1集气时受到武将2的攻击,损失1生命";
    }
    if (d1 == 2 && d2 == 3)
    {
        power2++;
        cout << "武将2趁武将1防御时集气,得1气";
    }
    if (d1 == 3 && d2 == 2)
    {
        power1++;
        cout << "武将1趁武将2防御时集气,得1气";
    }
    if (d1 == 3 && d2 == 3)
    {
        power1++;
        power2++;
        cout << "双方同时集气,各得1气";
    }
    if (d1 == 4 && d2 != 4)
    {
        power1 -= 2;
        health2 -= 3;
        cout << "武将1使出必杀,对对手造成3伤害";
    }
    if (d1 != 4 && d2 == 4)
    {
        power2 -= 2;
        health1 -= 3;
        cout << "武将2使出必杀,对对手造成3伤害";
    }
    if (d1 == 4 && d2 == 4)
    {
        power1 -= 2;
        power2 -= 2;
        cout << "双方同时必杀,相安无事";
    }
    cout << "】】】" << endl;
    return false;
}
//片段6 本回合战后统计
void result()
{   
    cout << "【双方状态】" << endl;
    cout << "*武将1:  生命" << health1 << "   气" << power1 << endl;
    cout << "*武将2:  生命" << health2 << "   气" << power2 << endl << endl;        
}
//片段7 公布对战结果, winner == 1 代表武将1胜, winner == 2 代表武将2胜
void showWinner(int winner)
{ 
    cout << endl << "【单挑结束!!!!!】" << endl;
    if (winner == 1) cout << "武将1击败对手获胜!!!!" << endl;
    else cout << "武将2击败对手获胜!!!!" << endl;
    cout << endl << endl;
}
//片段2 进行游戏
int pk()
{
    for(;;)
    {
        // 一方倒下游戏结束
        if (health1 <= 0) return 2;
        if (health2 <= 0) return 1;
        cout << "【开始回合" << ++cnt << "】" << endl;
        // 片段3 确定人类策略, 
        int human = human::strategy();
        // 片段4 确定电脑策略
        int ai = ai::strategy();
        //片段5 对战
        bool err = fight(human, ai);
        //片段6 本回合战后统计
        if (!err) result();         
        else cnt--;
    }
}

int a[230];
string d[3]={" ","O","X"};
int correct, wrong;
int getch()
{// 不回显的输入
    struct termios nts, ots;
    // 得到当前终端(0表示标准输入)的设置
    if (tcgetattr(0, &ots) < 0) return EOF;
    // 设置终端为Raw原始模式,该模式下所有的输入数据以字节为单位被处理
    nts = ots;
    cfmakeraw(&nts); 
    // 设置上更改之后的设置
    if (tcsetattr(0, TCSANOW, &nts) < 0) return EOF;
    // 设置还原成老的模式
    int cr;
    cr = getchar();
    if (tcsetattr(0, TCSANOW, &ots) < 0)  return EOF;
    return cr;
}
int print(int black)
{// 打印0-9数字 black数字标黑
    cout << "\033[0;0H";
    for (int i = 1; i <= 10; i++)
    {
        if (i%10 == black)
            cout << "\033[7m " << i%10 << " \033[0m";
        else
            cout << "\033[47;30m " << i%10 << " \033[0m";
    }
}
int print_keyboard(char ch, string color)
{// 打印键盘 ch字符设定为color颜色,其余默认
    char key[5][15] = {
        "1234567890-=",
        "QWERTYUIOP[]\\",
        "ASDFGHJKL;'",
        "ZXCVBNM,./"
    };
    cout << "\033[2;1H";
    for (int i = 0; i < 4; i++)
    {
        for (int j = 0; j < i; j++)
        {
            cout << " ";
        }
        for (int j = 0; key[i][j] != 0; j++)
        {
            if (ch == key[i][j])
            {
                if (color == "black")
                    cout << "\033[7m " << key[i][j] << " \033[0m";
                else if (color == "green")
                    cout << "\033[42;30m " << key[i][j] << " \033[0m";
                else if (color == "red")
                    cout << "\033[41;30m " << key[i][j] << " \033[0m";
            }
            else
                cout << "\033[47;30m " << key[i][j] << " \033[0m"; 
        }
        cout << endl;
    }
}
int typewritting()
{// 打字过程,返回总用时
    // 键盘字符集
    char s[] = "1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./";
    int len = strlen(s);
    srand(time(0));
    correct = 0;
    wrong = 0;
    int sta = time(0);
    const int TIMES = 30; // 出题数
    int last = 0;
    for (int i = 1; i <= TIMES; i++)
    {
        cout << "\033c" << flush;
        cout << "对: " << correct << " 错: " << wrong << "\n";
        // 抽取键盘字符集下标
        int r = rand() % len;
        // 避免连续两次按键相同
        while (r == last) r = rand() % len;
        last = r;
        print_keyboard(s[r], "black");
        char ch = getch();
        if (ch == s[r] || (islower(ch) && ch == tolower(s[r])))
        {
            print_keyboard(s[r], "green");
            correct++;
        }
        else
        {
            if (islower(ch))
                print_keyboard(toupper(ch), "red");
            else
                print_keyboard(ch, "red");
            wrong++;
        }
        usleep(100000);
    }
    int end = time(0);
    return end - sta;
}
void intro()
{// 规则介绍
    cout << "\033c" << flush;
    cout << "欢迎使用C++打字通!" << endl;
    sleep(1);
    cout << "开始后,你需要用最快的速度按下黑色字符所对应的按键。" << endl;
    sleep(1);
    cout<<"共30个字符。"<<endl;
    sleep(1);
    cout << "*注意:请将输入法改为英文!" << endl;
    sleep(1);
    cout << "准备好了嘛?" << endl;
    cout << "\033c" << flush;
    cout << "3" << endl;
    sleep(1);
    cout << "2" << endl;
    sleep(1);
    cout << "1" << endl;
    sleep(1);
    cout << "开始!" << endl;
    usleep(300000);
}
// 问题和答案的结构体
struct Question {
    string question;
    string answer;
};
// 初始化问题和答案
void initQuestions(Question questions[]) {
    questions[0] = {"What is the capital of France?", "Paris"};
    questions[1] = {"What is the largest planet in our solar system?", "Jupiter"};
    questions[2] = {"Which country is known as the Land of the Rising Sun?", "Japan"};
    questions[3] = {"What is the currency of China?", "Yuan"};
    questions[4] = {"Is orange round?", "Yes"};
    questions[5] = {"What is the chemical symbol for gold?", "Au"};
    questions[6] = {"Is James a basketball player?", "Yes"};
    questions[7] = {"Usain Bolt is fast or slow?", "fast"};
    questions[8] = {"Which animal is known as the 'King of the Jungle'?", "Lion"};
    questions[9] = {"What is the day between Monday and Wednesday?", "Tuesday"};
    
}
const int ROW = 10;
const int COL = 10;
const int MINE_NUM = 10;
vector<vector<int>> mineMap(ROW, vector<int>(COL, 0));
vector<vector<int>> showMap(ROW, vector<int>(COL, -1));
bool checkBound(int x, int y)
{
    if (x < 0 || x >= ROW || y < 0 || y >= COL) return false;
    return true;
}
void randomMine()
{
    int count = 0;
    while (count < MINE_NUM) {
        int x = rand() % ROW;
        int y = rand() % COL;
        if (mineMap[x][y] == 0) {
            mineMap[x][y] = 9;
            count++;
        }
    }
}
int calCount(int x, int y)
{
    int count = 0;
    for (int i = x - 1; i <= x + 1; i++) {
        for (int j = y - 1; j <= y + 1; j++) {
            if (checkBound(i, j) && mineMap[i][j] == 9) count++;
        }
    }
    return count;
}
void spread(int x, int y)
{
    if (!checkBound(x, y) || showMap[x][y] > -1 || mineMap[x][y] == 9) return;
    int count = calCount(x, y);
    showMap[x][y] = count;
    if (count == 0) {
        spread(x - 1, y - 1);
        spread(x - 1, y);
        spread(x - 1, y + 1);
        spread(x, y - 1);
        spread(x, y + 1);
        spread(x + 1, y - 1);
        spread(x + 1, y);
        spread(x + 1, y + 1);
    }
}
void printMap()
{
	for (int i = 0; i < ROW; i++)
    {
    	cout << i << " ";
        for (int j = 0; j < COL; j++)
        {
            if (showMap[i][j] == -1)
            {
                cout << "* ";
            }
            else if (showMap[i][j] == 0)
            {
                cout << "  ";
            } 
            else if (showMap[i][j] == 10) 
            {
                cout << "X ";
            } 
            else 
            {
                cout << showMap[i][j] << " ";
            }
        }
        cout << endl;
    }
}
bool checkWin()
{
    for (int i = 0; i < ROW; i++)
    {
        for (int j = 0; j < COL; j++)
        {
            if (showMap[i][j] == -1 && mineMap[i][j] != 9)
            {
                return false;
            }
        }
    }
    return true;
}
int program()
{
	cout << "想体验哪种模式(1 : 挑战模式,2 : 练习模式):" << "\n";
	int x;
	cin >> x;
	if(x == 1)
	{
		srand((unsigned)time(NULL));
		randomMine();
		while (true) {
			cout << "  0 1 2 3 4 5 6 7 8 9\n";
		    printMap();
		    char cx, cy;
		    cout << "请输入要打开的位置坐标(如0(x)1(y)),或输入-1结束游戏:" << endl;
			cin >> cx >> cy;
			int x = cx - '0',y = cy - '0';
		    if(x == 12345666787878 && y == 45456663222) {
		    	cout << "你赢了!高手高高手!" << endl;
		        break;
		    }
		    if (x == -1 || y == -1) {
		        break;
		    }
		    if (mineMap[x][y] == 9) {
		        cout << "你输了,请再来一局吧!" << endl;
		        break;
		    } else {
		        spread(x, y);
		        if (checkWin()) {
		            cout << "你赢了!高手高高手!" << endl;
		            break;
		        }
		    }
		}
	}
	else if(x == 2)
	{
		bool f = 1;
		while(f = 1)
		{
			srand((unsigned)time(NULL));
			randomMine();
			while (true)
			{
				cout << "  0 1 2 3 4 5 6 7 8 9\n";
			    printMap();
			    char cx = '^',cy = '^';
			    cout << "请输入要打开的位置坐标(如0(x)1(y)),或输入-1结束游戏:" << endl;
			    cin >> cx >> cy;
			    
			    int x = cx - '0',y = cy - '0';
			    if(x == 12345666787878 && y == 45456663222)
			    {
			    	cout << "你赢了!高手高高手!" << endl;
			        break;
			    }
			    if (x == -1 || y == -1)
			    {
			        break;
			    }
			    if (mineMap[x][y] == 9)
			    {
			    	cout << "你输了,是否再试试有没有其他方法吧!(Yes/No):";
			    	string s;
			    	cin >> s;
			    	if(s != "Yes") 
			    	{
			        	return 1;
			    	}
			    }
			    else 
			    {
			        spread(x, y);
			    }
			}
		}
		return 1;
	}
}
void recursion()
{
	if(program() > -1)
	{
		cout << "是否继续(Yes/No):";
		string s;
		cin >> s;
		if(s == "Yes")
		{
			mineMap.assign(ROW, vector<int>(COL, 0));
			showMap.assign(ROW, vector<int>(COL, -1));
			recursion();
		}
	}
}
int main()
{
	long long B;
	int A;
	B=10000000000;
	for(int j=0;j<1;B=100000000000)
	{
		cout<<"请选择你想玩的游戏:"<<endl<<"1、趣味22题 2、石头剪刀布 3、计算小达人 4、计算器 5、牛人游戏 6、打字不要后悔 7、金币 8、无头小子照片 9、学霸才做的加法题 10、火影忍者 11、欢迎贵宾玩扫雷 12、英语回答问题 13、愤怒的皮皮 14、打字游戏 15、战争世界 16、双人五子棋 17、小伙见到一沓钱 18、计算(除法为整数除法,只要余数) 19、武将pk 20、猜数 21、死亡空格 22、循环诗 23、打印单位矩阵 24、计算 25、运算 26、打印数字金字塔 27、ASCII码查询(密码114666888)。如果不想玩了输入0 (注意:不要乱输入字符、21和22谨慎使用)<( ̄︶ ̄)↗[GO!]"<<endl;
	cin>>A;
	

	if(A==3)
		{
			clear();
			sleep(1);
	    srand(time(0)); 
    int tsum = 0;
    int maxt = 0;
    long long mint = 99999999999;
    int wrongCount = 0, rightCount = 0;
    for (int i = 1; i <= 10 ; i++)  //请写出循环条件
    {
       	long double a = rand() % 10 + 1;
        long double b = rand() % 10 + 1;
        long double op = rand() % 4 + 1;
        int res;
        if (op == 1) // 加法
        {
            cout << a << " + " << b << " = " << endl;
            res = a + b;
        }
        if (op == 2) // 减法
        {
            if (a < b)
            {
                int c = a;
                a = b;
                b = c;
            }
            cout << a << " - " << b << " = " << endl;
            res = a - b;
        }
        if (op == 3) // 乘法
        {
            cout << a << " * " << b << " = " << endl;
            res = a * b;
        }
        if (op == 4) // 除法
        {
            cout << a * b << " / " << a << " = " << endl;
            res = b;
        }
	    int ans, beg = time(0); // 开始时间
	    cout << "请输入你的计算结果:" << endl;
	    cin >> ans;
		if (ans == res)
        {
            cout << "(^-^)V 答对了!" << endl;
            rightCount++;
        }
        else
        {
            cout << "┭┮﹏┭┮ 答错了!" << endl;
            wrongCount++;
        }
        cout << endl; 
        int end = time(0); // 结束时间
		tsum += end - beg;
		if (end - beg > maxt)
		{
			maxt = end - beg;
		}
		if(mint>end-beg)
		{
			mint=end-beg;
		}
        cout << "本题用时:" << end - beg << " 秒" << endl << endl;
        sleep(1);
        clear();
        sleep(1);
    }
    cout << "( ̄▽ ̄)~* 游戏结束!" << endl;
	cout << "总计:" << rightCount * 10.0<< " 分" <<endl;
    cout << "对:" << rightCount << " 道" << endl;
    cout << "错:" << wrongCount << " 道" << endl;
    cout << "总用时:" << tsum << " 秒" << endl;
    cout << "平均用时:" << tsum / 10.0 << " 秒" << endl;
    cout << "最慢用时:" << maxt <<"秒"<< endl;
    cout << "最快用时:" << mint <<"秒"<< endl;
		}
	else if(A==2)	
	{
		int e1,u,h;
		cout<<"和垃圾版AI玩石头剪刀布,你想要几局几胜?"<<endl;
		cout<<"1、三局两胜 2、五局三胜 3、七局四胜";
		cin>>e1;
		if(e1==1)
		{
			e1=3;
		}
		else if(e1==2)
		{
			e1=5;
		}
		else if(e1==3)
		{
			e1=7;
		}
		else if(e1>3)
		{
		e1=3;
		}
		else
		{
			e1=7;
		}
	// 任务1 玩家出招
	for(int u=0;u<e1;u++)
	{
	cout << "和AI玩石头剪刀布,请输入你的选择:"<< endl;
	cout << "1、石头" << endl;
	cout << "2、剪刀" << endl;
	cout << "3、布" << endl;
	int a1;
	cin >> a1;
	if(a1>3)
	{
		a1=a1%3+1;
	}

	if(a1== 1)
	{
		cout << "你出的是石头" << endl;
	}
	if(a1== 2)
	{
		cout << "你出的是剪刀" << endl;
	}
	if(a1 == 3)
	{
		cout << "你出的是布" << endl;
	}
	// 任务2 AI出招
	srand(time(0)); //评测时请注释掉这行数据
	int b1 = rand()%3 +1;
	if(b1 == 1)
	{
		cout << "AI出的是石头" << endl;
	}
	if(b1== 2)
	{
		cout << "AI出的是剪刀" << endl;
	}
	if(b1 == 3)
	{
		cout << "AI出的是布" << endl;
	}
	// 任务3 判断胜负
	// 使用if嵌套来完成判断
	if(a1==b1)
	{
		cout<<"平手"<<endl;
	}
	else
	{
		if(a1<b1)
		{
			if(b1-a1==2)
			{
				h+=1;
				cout<<"你输了";
			}
			else
			{
				u+=1;
				cout<<"你赢了";
			}
		}
		else
		{
			if(a1-b1==2)
			{
				u+=1;
				cout<<"你赢了";
			}
			else
			{
				h+=1;
				cout<<"你输了";
			}
		}
	}
	}
	if(u>=h)
	{
		cout<<"总场结算:你赢了。";
	}
	else
	{
		cout<<"总场结算:你输了。";
	}
	}
	else if(A==1)
	{
	int a,b,c,d;
    long double e;//a是选择,b是做对题目数,c是想做的题目数,d是你想做的关卡;
    cout<<"请选择你想做的题目数:";
    cin>>c;
    b=0;
    for(int i=1;i<=c;i++)
    {
    	cout<<"第"<<i<<"次答题,请选择你想做的关卡(一共22题)";
    	cin>>d;
    	if(d>22)
    	d=d%22+1;
    	if(d==1)
    	{
    		cout<<"请问地球🌏最深的海沟是什么海沟?"<<endl;
    		cout<<"1、日本海沟🗾 2、秘鲁-智利海沟 3、马里亚纳海沟";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==3)
    		{
    			b+=1;
    			cout<<"(^ - ^)V答对了!";
    		}
    		else if(a==1||a==2)
    		{
    			cout<<"~_~ 答错了";
    		}
    		else
    		{
    			cout<<"没有该答案哦,继续";
    			cin>>a;
    		if(a==3)
    		{
    			b+=1;
    			cout<<"(^ - ^)V答对了!";
    		}
    		else
    		{
    			cout<<"~_~ 答错了";
    		}
    		
    		}
    	}
    	if(d==2)
    	{
    		cout<<"请问全球最大的沙漠是什么沙漠🏜?"<<endl;
    		cout<<"1、利比亚沙漠 2、撒哈拉沙漠 3、阿拉伯沙漠";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==2)
    		{
    			b+=1;
    			cout<<"(^ _ ^)V答对了!";
    		}
    		else
    		{
    			cout<<"答错了/(ㄒoㄒ)/~~";
    		}
    	}
    	if(d==3)
    	{
    		cout<<"世界上最长的裂缝是什么?"<<endl;
    		cout<<"1、加拿大北极裂谷 2、东非大裂谷 3、大西洋裂缝";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==3)
    		{
    			b+=1;
    			cout<<"答对啦!";
    		}
    		else
    		{
    			cout<<"答错了";
    		}
    	}
    	if(d==4)
    	{
    		cout<<"全世界最安全的房子是什么?"<<endl;
    		cout<<"1、白宫 2、生存公寓 3、亚历山大堡";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==3)
    		{
    			b+=1;
    			cout<<"(*^_^*)答对啦!";
    		}
    		else
    		{
    			cout<<"/(ㄒoㄒ)/~~答错了。";
    		}
    	}
    	if(d==5)
    	{
    		cout<<"世界上最长的堵车发生在哪里?"<<endl;
    		cout<<"1、巴西 2、俄罗斯 3、亚特兰大";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==1)
    		{
    			b+=1;
    			cout<<"答对啦";
    		}
    		else
    		{
    			cout<<"答错了";
    		}
    	}
    	if(d==6)
    	{
    		cout<<"世界上最危险的海洋生物是什么?"<<endl;
    		cout<<"1、大白鲨 2、姥鲨 3、鲸鲨";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==3)
    		{
    			b+=1;
    			cout<<"答对啦";
    		}
    		else{
    			cout<<"答错了";
    		}
    	}
    	if(d==7)
    	{
    		cout<<"人类已知宇宙中最大的黑洞是什么?"<<endl;
    		cout<<"1、人马座a 2、Phoenix a 3、TON 618";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==2)
    		{
    			b+=1;
    			cout<<"答对啦q(≧▽≦q)";
    		}
            else
            {
            	cout<<"答错了啊( •̀ ω •́ )继续加油✧";
            }
    	}
    	if(d==8)
    	{
    		cout<<"人类已知宇宙中体积最大的恒星是什么?"<<endl;
    		cout<<"1、史蒂文森2-18 2、太阳☀  3、盾牌座uy";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==1)
    		{
    			b+=1;
    			cout<<"答对啦";
    		}
    		else
    		{
    			cout<<"答错了";
    		}
    	}
    	if(d==9)
    	{
    		cout<<"人类已知宇宙中最高的山是什么?"<<endl;
    		cout<<"1、珠穆朗玛峰 2、奥林匹斯山 3、瑞亚希尔维娅山";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==2)
    		{
    			cout<<"答对啦";
    			b+=1;
    		}
    		else
    		{
    			cout<<"答错了";
    		}
    	}
    	if(d==10)
    	{
    		cout<<"人类已知宇宙中最大的天体?"<<endl;
    		cout<<"1、室女座超星系团 2、拉尼亚凯亚星系团 3、武仙-北冕座长城";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==3)
    		{
    			b+=1;
    			cout<<"答对啦";
    		}
    		else
    		{
    			cout<<"答错了";
    		}
    	}
    	if(d==11)
    	{
    		cout<<"conversation是什么意思?"<<endl;
    		cout<<"1、谈话 2、绘画 3、地点";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==1)
    		{
    			b+=1;
    			cout<<"bingo答对啦";
    		}
    		else
    		{
    			cout<<"I am sad.答错了/(ㄒoㄒ)/~~";
    		}
    	}
    	if(d==12)
    	{
		    cout<<"龙在英语中的新语言是什么?"<<endl;
		    cout<<"1、loong 2、dragon 3、dinosaur";
		    cin>>a;
		    if(a>3||a==0)
		    a=a%3+1;
		    if(a==1)
		    {
		    	b+=1;
		    	cout<<"答对啦";
		    }
		    else
		    {
		    	cout<<"答错了";
		    }
    	}
    	if(d==13)
    	{
    		cout<<"'你(们)的'在英语里怎么说?"<<endl;
    		cout<<"1、you 2、your 3、this";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==2)
    		{
    			b+=1;
    			cout<<"答对啦(〃 ̄︶ ̄)人( ̄︶ ̄〃)";
    		}
    		else
    		{
    			cout<<"答错了≡(▔﹏▔)≡";
    		}
    	}
    	if(d==14)
    	{
    		cout<<"2*50=?ヾ(•ω•`)o"<<endl;
    		cout<<"1、100 2、50 3、我去拿个计算机(@_@;)";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==1)
    		{
    			b+=1;
    			cout<<"答对啦";
    		}
    		else if(a==3)
    		{
    			cout<<"本题不支持使用计算机,回答错误";
    		}
    		else
    		{
    			cout<<"回答错误(⊙o⊙)";
    		}
    	}
    	if(d==15)
    	{
    		cout<<"Mid-Autumn Festval是什么意思?"<<endl;
    		cout<<"1、女神节 2、中秋节 3、七夕节";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==2)
    		{
    			b+=1;
    			cout<<"回答正确。";
    		}
    		
    			
    			
    		else
    		{
    			cout<<"回答错误。";
    		}
    	}
    	if(d==16)
    	{
    		cout<<"请问'三十功名尘与土,八千里路云和月'是杜甫写的吗?"<<endl;
    		cout<<"1、对 2、错";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==2)
    		{
    			b+=1;
    			cout<<"回答正确";
    		}
    		else
    		{
    			cout<<"回答错误,'三十功名尘与土,八千里路云和月。'出自岳飞的《满江红 写怀》";
    		}
    	}
    	if(d==17)
    	{
    		cout<<"double是什么"<<endl;
    		string A;
    		cout<<"a、浮点数 b、平方数 c、整数";
    		cin>>A;
    		cout<<endl;
    		if(A=="a")
    		{
    			b+=1;
    			cout<<"你也是会C++的";
    		}
    		else
    		{
    			cout<<"你不会C++";
    		}
    	}
    	if(d==18)
    	{
    		cout<<"unordered_motimap出自哪个头文件?"<<endl;
    		cout<<"1、unordered_map 2、functional 3、map";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==1)
    		{
    			b+=1;
    			cout<<"你竟然对了!";
    		}
    		else
    		{
    			cout<<"就知道你会错(•̀ ω •́ )✧";
    		}
    	}
    	if(d==19)
    	{
    		cout<<"'int main(){}'这个编程成不成立"<<endl;
    		cout<<"1、成立 2、不成立";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==1)
    		{
    			b+=1;
    			cout<<"确实";
    		}
    		else
    		{
    			cout<<"确实才怪";
    		}
    	}
    	if(d==20)
    	{
    		cout<<"请问以下哪个不是MC的全称?"<<endl;
    		cout<<"1、Minecraft 2、microphone Controler 3、Mine Coffee";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==3)
    		{
    			b+=1;
    			cout<<"什么!你竟然对了!!!";
    		}
    		else
    		{
    			cout<<"haha cool!你错了!";
    		}
    	}
    	if(d==21)
    	{
    		cout<<"世界上最厉害的武器是什么?"<<endl<<"1、UMG-133A弹道导弹 2、撒旦导弹 3、沙皇炸弹大伊万【💣(╯‵□′)╯炸弹!•••*~●】";
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==3)
    		{
    			cout<<"答对啦";
    			b+=1;
    		}
    		else
    		{
    			cout<<"答错了";
    		}
    	}
    	if(d==22)
    	{
    		cout<<"请问至2019年,最流行的编程语言是什么?"<<endl;
    		cout<<"1、Python 2、C++ 3、Fortran"<<endl;
    		cin>>a;
    		if(a>3||a==0)
    		a=a%3+1;
    		if(a==1)
    		{
    			cout<<"答对啦";
    			b++;
    		}
    		else
    		{
    			cout<<"答错了/(|!*o!*|)/~~";
    		}
    	}
    
    }
    cout<<"你对了"<<b<<"题"<<endl;
    cout<<"你错了"<<c-b<<"题"<<endl;
    cout<<"正确率:"<< double(100/c*b)<<"%"<<endl;
	}
	else if(A==4)
	{
		while(1)
		{
		long long a2;
	cout<<"一、1、整数加法 2、整数减法  3、整数乘法 4、整数除法 5、小数加法 6、小数减法 7、小数乘法 8、小数除法 9、判断奇偶数 10、将小数四舍五入到几位 11、绝对值 12、double类型向上取整 13、double类型向下取整 14、最大值 15、最小值 16、菱形 17、退出 18、倒立直角三角形 19、长方形 20、等腰三角形 21、整数平方 22、整数绝对值 23、float类型向上取整 24、float类型向下取整 25、long double类型向上取整 26、long double类型向下取整 27、平方根 28、立方根 29、double类型小数绝对值 30、float类型小数绝对值 31、long double类型绝对值  二、商是整数的小数除法 32、double类型的求余 33、int类型的求余 34、float类型的求余 35、long double类型的求余 三、36、hypot 37、float类型平方 38、long double类型平方 39、float类型平方根 40、long double类型平方根 41、long类型绝对值 42、c++最大储存范围 43、acos 44、acosl 45、acosl 46、asin 47、asinf 48、asinl 49、atan 50、atan2 51、atan2f 52、atan2l 53、atanf 54、atanl 55、cos 56、cosf 57、cosh 58、coshf 59、coshl 60、cosl 61、exp 62、expf 63、expl(可能超出数据范围,或cout默认精度)";
	cin>>a2;
	if(a2==1)
	{
		long long a3;
		cout<<"请输入你想相加的数:";
		cin>>a2>>a3;
		cout<<endl;
		cout<<a2<<"+"<<a3<<"="<<a2+a3<<endl;
	}
	if(a2==2)
	{
		long long b1,b2;
		cout<<"请输入被减数:";
		cin>>b1;
		cout<<endl;
		cout<<"请输入被减数:";
		cin>>b2;
		cout<<endl;
		cout<<b1<<"-"<<b2<<"="<<b1-b2<<endl;
	}
	if(a2==3)
	{
		long long c1,c2;
		cout<<"请输入你想相乘的数:";
		cin>>c1>>c2;
		cout<<endl;
		cout<<c1<<"*"<<c2<<"="<<c1*c2<<endl;
	}
	if(a2==4)
	{
	    long long d1,d2;
		cout<<"请输入被除数:";
		cin>>d1;
		cout<<endl;
		cout<<"请输入除数:";
		cin>>d2;
		cout<<endl;
		cout<<d1<<"/"<<d2<<"="<<d1/d2<<"……"<<d1%d2<<endl;
	}
	if(a2==5)
	{
		long double f1,f2;
		cout<<"请输入你想相加的数:";
		cin>>f1>>f2;
		cout<<endl;
		cout<<f1<<"+"<<f2<<"="<<f1+f2<<endl;
	}
	if(a2==6)
	{
		long double g1,g2;
		cout<<"请输入被减数:";
		cin>>g1;
		cout<<endl;
		cout<<"请输入减数:";
		cin>>g2;
		cout<<endl;
		cout<<g1<<"-"<<g2<<"="<<g1-g2<<endl;
	}
	if(a2==7)
	{
		long double man1,man2;
		cout<<"请输入你想相乘的数:";
		cin>>man1>>man2;
		cout<<endl;
		cout<<man1<<"*"<<man2<<"="<<man1*man2<<endl;
	}
	if(a2==8)
	{
		long double say1,say2;
		cout<<"请输入被除数:";
		cin>>say1;
		cout<<endl;
		cout<<"请输入除数:";
		cin>>say2;
		cout<<endl;
		cout<<say1<<"/"<<say2<<"="<<say1/say2<<endl;
	}
	if(a2==9)
	{
		long long you;
		cout<<"请输入你要判断的数:";
		cin>>you;
		if(you%2==0)
		{
			cout<<you<<"是偶数"<<endl;
		}
		else
		{
			cout<<you<<"是奇数"<<endl;
		}
		
	}
	if(a2==10)
	{
		long double WC;
		long Wc;
		cout<<"请输入一个小数:";
		cin>>WC;
		cout<<"保留几位小数:";
		cin>>Wc;
		cout<<fixed<<setprecision(Wc)<<WC<<endl;
	}
	if(a2==11)
	{
		long long pig;
		cout<<"请输入一个整数:";
		cin>>pig;
		cout<<"绝对值是"<<abs(pig)<<endl;
	}
	if(a2==12)
	{
		cout<<"请输入一个double类型小数:";
		long double dog;
		cin>>dog;
		cout<<ceil(dog)<<endl;
	}
	if(a2==13)
	{
		long double yukky;
		cout<<"请输入一个double类型小数:";
		cin>>yukky;
		cout<<floor(yukky)<<endl;
	}
	if(a2==14)
	{
		long double sun2,maxn=-9e18;
		long long sun1;
		cout<<"请输入你要多少个数的最大值:";
		cin>>sun1;
		cout<<"请输入这几个数,用空格隔开。";
		for(int j=0;j<sun1;j++)
		{
			
			cin>>sun2;
			maxn=fmax(sun2,maxn);
				
			
		}
		cout<<"最大值是"<<maxn<<endl;
	}
	if(a2==15)
	{
		long long sha;
		long double sha1,minn=9e18;
		cout<<"请输入你想要多少个数的最小值:";
		cin>>sha;
		cout<<"请输入这几个数,用空格隔开。";
		for(int s=0;s<sha;s++)
		{
			cin>>sha1;
			minn=fmin(minn,sha1);
		}
		cout<<"最小值是"<<minn<<endl;
	}
	if(a2==16)
	{
		cout<<"输入一个数";
		int n;
    cin >> n;
    
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n - i; j++) {
            cout << ' ';
        }
        for (int j = 1; j <= i; j++) {
            cout << "* ";
        }
        cout << endl;
    }
    for(int i=n-1;1<=i;i--)
    {
      for (int j = 1; j <= n - i; j++) {
            cout << ' ';
        }
        for (int j = 1; j <= i; j++) {
            cout << "* ";
        }
        cout << endl;  
    }
	}
	if(a2==17)
	{
		break;
	}
	if(a2==18)
	{
		int n;
		printf("输入一个数\n");
		cin >> n;
    for (int i = n; 1 <= i; i--) {
        for (int j = 1; j <= i; j++) {
            cout << '*';
        }
        cout << endl;
    }
    
    }
    if(a2==19)
    {
    	cout<<"输入长和宽";
    	int n, m;
    cin >> m >> n;
    for(int i=1; i<=m;i++)
    {
        for(int j=1;j<=n;j++)
        {
        cout<<'*';
        }
        cout<<endl;
    }
	}
	if(a2==20)
	{
		int n;
    cin >> n;
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=n-i;j++)
        {
         cout<<' ';
        }
        for(int j=1;j<=2*i-1;j++)
        {
        cout<<'*';
        }
        cout<<endl;
    }
	}
	if(a2==21)
	{
		long long a,b;
		printf("输入多少的多少次方");
		cin>>a>>b;
		cout<<pow(a,b)<<endl;
		
	}
	if(a2==22)
	{
		printf("Enter a number");
		int n1;cin>>n1;cout<<abs(n1)<<endl;
	}
	if(a2==23)
	{
		cout<<"输入一个float类型小数:";
		float a3;
		cin>>a3;
		cout<<"是"<<ceilf(a3)<<endl;
	}
	if(a2==24)
	{
		cout<<"输入一个float类型的小数:";
		float b3;
		cin>>b3;
		cout<<"是"<<floorf(b3)<<endl;
	}
	if(a2==25)
	{
		cout<<"输入一个long double类型的小数:";
		long double c3;
		cin>>c3;
		cout<<"是"<<ceill(c3)<<endl;
	}
	if(a2==26)
	{
		cout<<"输入一个long double类型的小数:";
		long double d3;
		cin>>d3;
		cout<<"是"<<floorl(d3)<<endl;
	}
	if(a2==27)
	{
		cout<<"输入要求多少的平方根:";
		long double r;
		cin>>r;
		cout<<r<<"的平方根是"<<sqrt(r)<<endl;
	}
	if(a2==28)
	{
		cout<<"输入要求多少的立方根:";
		long double s;
		cin>>s;
		cout<<s<<"的立方根是"<<cbrt(s)<<endl;
	}
	if(a2==29)
	{
		cout<<"输入一个小数:";
		double s1;
		cin>>s1;
		cout<<"是"<<fabs(s1)<<endl;
	}
	if(a2==30)
	{
		cout<<"输入一个float类型的小数:";
		float dd;
		cin>>dd;
		cout<<"是"<<fabsf(dd)<<endl;
	}
	if(a2==31)
	{
		cout<<"输入一个long double类型的小数:";
		long double aa;
		cin>>aa;
		cout<<"是"<<fabsl(aa)<<endl;
	}
	if(a2==32)
	{
		cout<<"输入要求多少除以多少的余数:";
		double aa,aaa;
		cin>>aa>>aaa;
		cout<<"是"<<fmod(aa,aaa)<<endl;
	}
	if(a2==33)
	{
		cout<<"输入要求多少除以多少的余数:";
		int aaaa,aaaaa;
		cin>>aaaa>>aaaaa;
		cout<<"是"<<aaaa%aaaaa<<endl;
	}
	if(a2==34)
	{
		cout<<"输入要求多少除以多少的余数:";
		float bbb,bbbb;
		cin>>bbb>>bbbb;
		cout<<"是"<<fmodf(bbb,bbbb)<<endl;
	}
	if(a2==35)
	{
		cout<<"输入要求多少除以多少的余数:";
		long double ddd,dddd;
		cin>>ddd>>dddd;
		cout<<"是"<<fmodl(ddd,dddd)<<endl;
	}
	if(a2==36)
	{
		cout<<"输入两个数:";
		long double ee,eee;
		cin>>ee>>eee;
		cout<<"约等于"<<hypot(ee,eee)<<endl;
	}
	if(a2==37)
	{
		float tt,ttt;
		cout<<"输入要求多少的多少次方";
		cin>>tt>>ttt;
		cout<<"是"<<powf(tt,ttt)<<endl;
	}
	if(a2==38)
	{
		long double gg,ggg;
		cout<<"输入要求多少的多少次方";
		cin>>gg>>ggg;
		cout<<"是"<<powl(gg,ggg)<<endl;
	}
	if(a2==39)
	{
		float sp;
		cout<<"输入要求多少的平方根";
		cin>>sp;
		cout<<sp<<"的平方根是"<<sqrtf(sp)<<endl;
	}
	if(a2==40)
	{
		long double sb;
		cout<<"输入要求多少的平方根";
		cin>>sb;
		cout<<sb<<"的平方根是"<<sqrtl(sb)<<endl;
	}
	if(a2==41)
	{
		long ed;
		cout<<"输入一个long类型的数";
		cin>>ed;
		cout<<"是"<<labs(ed)<<endl;
	}
	if(a2==42) 
	{
		unsigned long long aaaaaa=18446744073709551615;
		cout<<aaaaaa<<endl;
	}
	if(a2==43)
	{
		cout<<"输入一个double类型的数(-1~1):";
		double a6;
		cin>>a6;
		cout<<"是"<<acos(a6)<<endl;
	}
	if(a2==44)
	{
		cout<<"输入一个float类型的数(-1~1):";	
		float a7;
		cin>>a7;
		cout<<"是"<<acosf(a7)<<endl;
	}
	if(a2==45)
	{
		cout<<"输入一个long double类型的数(-1~1):";
		long double a8;
		cin>>a8;
		cout<<"是"<<acosl(a8)<<endl;
	}
	if(a2==46)
	{
		cout<<"输入一个double类型的数:";
		double b2;
		cin>>b2;
		cout<<"是"<<asin(b2)<<endl;
	}
	if(a2==47)
	{
		cout<<"输入一个float类型的数:";
		float ab;
		cin>>ab;
		cout<<"是"<<asinf(ab)<<endl;
	}
	if(a2==48)
	{
		cout<<"输入一个long double类型的数:";
		long double bc;
		cin>>bc;
		cout<<"是"<<asinl(bc)<<endl;
	}
	if(a2==49)
	{
		cout<<"输入一个double类型的数:";
		double cd;
		cin>>cd;
		cout<<"是"<<atan(cd)<<endl;
	}
	if(a2==50)
	{
		cout<<"输入两个double类型的数:";
		double de,ef;
		cin>>de>>ef;
		cout<<"是"<<atan2(de,ef)<<endl;
	}
	if(a2==51)
	{
		cout<<"输入两个float类型的数:";
		float ac,bd;
		cin>>ac>>bd;
		cout<<"是"<<atan2f(ac,bd);
	}
	if(a2==52)
	{
		cout<<"输入两个long double类型的数:";
		long double ad,ba;
		cin>>ad,ba;
		cout<<"是"<<atan2l(ad,ba)<<endl;
	}
	if(a2==53)
	{
		cout<<"输入一个float类型的数:";
		float fd;
		cin>>fd;
		cout<<"是"<<atanf(fd);
	}
	if(a2==54)
	{
		cout<<"输入一个long double类型的数:";
		long double sa;
		cin>>sa;
		cout<<"是"<<atanl(sa)<<endl;
	}
	if(a2==55)
	{
		cout<<"输入一个double类型的数:";
		double value;
		cin>>value;
		cout<<"是"<<cos(value)<<endl;
	}
	if(a2==56)
	{
		cout<<"输入一个float类型的数:";
		float lann;
		cin>>lann;
		cout<<"是"<<cosf(lann)<<endl;
	}
	if(a2==57)
	{
		cout<<"输入一个double类型的数:";
		double xy;
		cin>>xy;
		cout<<"是"<<cosh(xy)<<endl;
	}
	if(a2==58)
	{
		cout<<"输入一个float类型的数:";
		float yx;
		cin>>yx;
		cout<<"是"<<coshf(yx)<<endl;
	}
	if(a2==59)
	{
		cout<<"输入一个long double类型的数:";
		long double yz;
		cin>>yz;
		cout<<"是"<<coshl(yz)<<endl;
	}
	if(a2==60)
	{
		cout<<"输入一个long double类型的数:";
		long double ggg;
		cin>>ggg;
		cout<<"是"<<cosl(ggg)<<endl;
	}
	if(a2==61)
	{
		cout<<"输入一个double类型的数:";
		long double ZLB;
		cin>>ZLB;
		cout<<"是"<<exp(ZLB)<<endl;
	}
	if(a2==62)
	{
		cout<<"输入一个float类型的数:";
		float zlb;
		cin>>zlb;
		cout<<"是"<<expf(zlb)<<endl;
	}
	if(a2==63)
	{
		cout<<"输入一个long double类型的数:";
		long double zlb1;
		cin>>zlb1;
		cout<<"是"<<expl(zlb1)<<endl;
	}
	//59、coshl 60、cosl 61、exp 62、expf 63、expl
		}
	}
	else if(A==5)
	{
		long long oh;
		cout<<"有多少只牛?";
		cin>>oh;
		cout<<"有多少个人?";
		long long yuh;
		cin>>yuh;
		for(long long i=0;i<oh;i++)
		{
		cout<<"Moo!";
		}
		for(long long i=0;i<yuh;i++)
		{
			cout<<"我是人!";
		}
	}
	else if(A==6)
	{
		string ohg;
		cout<<"写一个字……";
		long long a=time(0);
		cin>>ohg;
		long long b=time(0)-a;
		cout<<"速度为"<<b<<"s"<<endl;
	}
	else if(A==7)
	{

    				//第一部分:规则
  int jinbi=0,a,chu;	//jinbi为随机1000-2000金币,a为停顿
  ;
  cout<<"输入任何数开始"<<endl;
  cin>>a;
  if(a==1)
  {
  	cout<<"游戏开始"<<endl;
  }
  cout<<"规则:玩家最开始有随机数量的金币,要用金币去换皮肤,不同的皮肤要花不同的金币,自然也有更多潮流值。潮流值:在和别人比拼中,潮流值更高的一方获胜,赢的一方获得200金币,平了各加150金币,输的一方扣掉100金币。卡牌:机器每隔一段时间就会发出三张卡牌,你可以三选一,不同的卡牌有不同的技能(都写在卡牌上了)。系统也会发放宝箱!遇到别人可选择躲避或比拼,也可查看对方的潮流值。(潮流值比不过对方就跑吧)攒到跟多金币就可以升级皮肤了。如果游戏结束后金币数数量大于初始金币数则获胜,否则失败!!!"<<endl;
  
  srand(time(0));
  jinbi=rand()%19001+1000;
  chu=jinbi;
  cout<<"这是你目前抽到的金币数(随机)"<<jinbi<<endl;	
					//第一部分完
					
					//第二部分:选皮肤
  cout<<"请选择皮肤"<<endl;
  cout<<"1.新年服装,要花500金币,共50朝流值   2.中秋服装,要花400金币,共40潮流值    3.端午服装,要花600金币,共60潮流值"<<endl;
  cout<<"请输入序号"<<endl;
  int chao;    
  cin>>a;						
  if(a==1)
  {
  	jinbi-=500;
  	chao=50;
  	cout<<"剩余金币:"<<jinbi<<endl;
  	cout<<"共有潮流值:"<<chao<<endl;
  }
	if(a==2)
  {
  	jinbi-=400;
  	chao=40;
  	cout<<"剩余金币:"<<jinbi<<endl;
  	cout<<"共有潮流值:"<<chao<<endl;
  }
	if(a==3)
  {
  	jinbi-=600;
  	chao=60;
  	cout<<"剩余金币:"<<jinbi<<endl;
  	cout<<"共有潮流值:"<<chao<<endl;
  }
					//第二部分完
					//第三部分:遇人
	srand(time(0));
	int n=rand();
	n=rand()%100+1;
	
	cout<<"你遇到别人了,对方潮流值为"<<n<<endl;
	cout<<"你要怎么办,请选择"<<endl;	
	cout<<"1.比拼  2.逃跑"<<endl;
	
	
	cin>>a;
	if(a==1)
	{
		if(chao>n)
		{
			cout<<"你赢了,奖励200金币"<<endl;
			jinbi+=200;
			cout<<"现在共有"<<jinbi<<"枚金币"<<endl;
		}
		else if(chao==n)
		{
			cout<<"打平了,获得150金币"<<endl;
			jinbi+=150;
			cout<<"现在共有"<<jinbi<<"枚金币"<<endl;
		}
		else if(chao<n)
		{
			cout<<"你输了,失去100金币"<<endl;
			jinbi-=100;
			cout<<"现在共有"<<jinbi<<"枚金币"<<endl;
		}
	}
	else
	{
		cout<<"你现在共有"<<jinbi<<"枚金币"<<endl;
		cout<<"请进行第二次皮肤选择(可不选)"<<endl;
		cout<<"1.医生服装 要花400金币 共50潮流值     2.老师服装  要花500金币  共50潮流值      3.警察服装  要花800金币  共90潮流值  0.不选"<<endl;
		cout<<"请输入序号"<<endl;
  cin>>a;						
  if(a==1)
  {
  	jinbi-=400;
  	chao=50;
  	cout<<"剩余金币:"<<jinbi<<endl;
  	cout<<"共有潮流值:"<<chao<<endl;
  }
	if(a==2)
  {
  	jinbi-=500;
  	chao=50;
  	cout<<"剩余金币:"<<jinbi<<endl;
  	cout<<"共有潮流值:"<<chao<<endl;
  }
	if(a==3)
  {
  	jinbi-=800;
  	chao=90;
  	cout<<"剩余金币:"<<jinbi<<endl;
  	cout<<"共有潮流值:"<<chao<<endl;
  }
	}
	if(a==0)
  {
  cout<<"剩余金币:"<<jinbi<<endl;
  	cout<<"共有潮流值:"<<chao<<endl;
  }
        //第四部分:卡牌
   cout<<"请选择卡牌"<<endl;
   cout<<"1.神秘红包 获得1-50金币"<<endl;
   cout<<"2.破罐破摔 获得或失去80-800金币"<<endl;
   cout<<"3走钢丝 获得20潮流值或失去10潮流值"<<endl;
   
   a=0;
   cin>>a;
   if(a==1)
   {
   	int k=0;
   	srand(time(0));
   	k=rand()&50+1;
   	jinbi+=k;
   	cout<<"你获得了"<<k<<"枚金币"<<endl;
   	cout<<"剩余金币:"<<jinbi<<endl;
  	cout<<"共有潮流值:"<<chao<<endl;
   }//卡牌一
     int s=0,v=0,x=0;
     if(a==2)
     {
     	srand(time(0));
     	s=rand();
     	s=s%2+1;
     	if(s==1)
     	{
     	  
     	  srand(time(0));
     	  
     	  v=v%721+80;
     	  jinbi+=v;
     	  cout<<"你获得了"<<v<<"枚金币"<<endl;
     	  cout<<"共有金币:"<<jinbi<<endl;
  	      cout<<"共有潮流值:"<<chao<<endl;
     	  
     	}
     	if(s==2)
     	{
     	  
     	  srand(time(0));
     	  
     	  x=x%721+80;
     	  jinbi-=x;
     	  cout<<"你失去了"<<x<<"枚金币"<<endl;
     	  cout<<"共有金币:"<<jinbi<<endl;
  	      cout<<"共有潮流值:"<<chao<<endl;
     	  
     	}
     }//卡牌二
   int y=0;
   if(a==3)//卡牌三
   {
   	srand(time(0));
   	y=rand();
   	y=y%2+1;
   	if(y==1)
   	{
   	chao+=20;
   		cout<<"共有"<<jinbi<<"枚金币"<<endl;
  	cout<<"获得潮流值:20"<<endl;
  	cout<<"共有潮流值:"<<chao<<endl;
   	}
   	if(y==2)
   	{
   	chao-=10;
   		cout<<"共有"<<jinbi<<"枚金币"<<endl;
  	cout<<"失去潮流值:10"<<endl;
  	cout<<"共有潮流值:"<<chao<<endl;
   	}
   }
	
				//第五部分:宝箱
	cout<<"请选择宝箱"<<endl;
	cout<<"1号宝箱     2号宝箱         3号宝箱"<<endl;
	cout<<"请做出选择"<<endl;
	
	int p;
	cin>>p;
	if(p==1)
	{
		jinbi+=100;
		cout<<"你获得了:100枚金币"<<endl;
		cout<<"共有金币:"<<jinbi<<"枚金币"<<endl;
		cout<<"共有潮流值:"<<chao<<endl;
	}
	if(p==2)
	{
		jinbi+=500;
		cout<<"你获得了:500枚金币"<<endl;
		cout<<"共有金币:"<<jinbi<<"枚金币"<<endl;
		cout<<"共有潮流值:"<<chao<<endl;
	}
	if(p==3)
	{
		chao+=10;
		cout<<"你获得了:10潮流值"<<endl;
		cout<<"共有金币:"<<jinbi<<"枚金币"<<endl;
		cout<<"共有潮流值:"<<chao<<endl;
	}
					//第五部分完
					
					//第六部分:突发事件
	cout<<"突发事件"<<endl;
	int q=0,l=0,m=0,a1=0,a2=0;
	srand(time(0));
	q=rand();
	q=q%4+1;
	if(q==1)
	{
		cout<<"突发事件:天降福星"<<endl;
		cout<<"获得1-200"<<endl;
				
		srand(time(0));
		l=rand();
   		l=l%200+1;
   		jinbi+=l;
   		cout<<"你获得了:"<<l<<"枚金币"<<endl;
		cout<<"共有金币:"<<jinbi<<"枚金币"<<endl;
		cout<<"共有潮流值:"<<chao<<endl;
   		
		
	}
	if(q==2)
	{
		cout<<"突发事件:发放潮流值"<<endl;
		cout<<"获得1-200"<<endl;
				
		srand(time(0));
		m=rand();
   		m=m%20+1;
   		chao+=m;
   		cout<<"你获得了潮流值:"<<m<<endl;
		cout<<"共有金币:"<<jinbi<<"枚金币"<<endl;
		cout<<"共有潮流值:"<<chao<<endl;
   		
		
	
	if(q==3)
	{
		cout<<"突发事件:海潮金币"<<endl;
		cout<<"获得1-2000"<<endl;
				
		srand(time(0));
		a1=rand();
   		l=a1%2000+1;
   		jinbi+=a1;
   		cout<<"你获得了:"<<a1<<"枚金币"<<endl;
		cout<<"共有金币:"<<jinbi<<"枚金币"<<endl;
		cout<<"共有潮流值:"<<chao<<endl;
   		
		
	}
		
	if(q==3)
	{
		cout<<"突发事件:海量潮流值"<<endl;
		cout<<"获得1-200"<<endl;
				
		srand(time(0));
		a2=rand();
   		a2=a2%200+1;
   		chao+=a2;
   		cout<<"你获得了潮流值:"<<a2<<endl;
		cout<<"共有金币:"<<jinbi<<"枚金币"<<endl;
		cout<<"共有潮流值:"<<chao<<endl;
   		
		
	}
				//第六部分完
				
				//第七部分:再遇人
	srand(time(0));
	int a3=rand();
	a3=rand()%100+1;
	cout<<"对方潮流值为:"<<a3<<"你必须跟他比拼"<<endl;
	if(chao>a3)
		{
			cout<<"你赢了,奖励200金币"<<endl;
			jinbi+=200;
			cout<<"现在共有"<<jinbi<<"枚金币"<<endl;
		}
		else if(chao==a3)
		{
			cout<<"打平了,获得150金币"<<endl;
			jinbi+=150;
			cout<<"现在共有"<<jinbi<<"枚金币"<<endl;
		}
		else 
		{
			cout<<"你输了,失去100金币"<<endl;
			jinbi-=100;
			cout<<"现在共有"<<jinbi<<"枚金币"<<endl;
		}
	}
					//第七部分完
					
					//第八部分:分胜负
	cout<<"来吧!!一决胜负吧!!!"<<endl;
	cout<<"共有金币:"<<jinbi<<"枚金币"<<endl;
	cout<<"共有潮流值:"<<chao<<endl;
	cout<<"初始金币为:"<<chu<<endl;
	if(jinbi>chu)
	{
		cout<<"你现在的金币数大于初始金币数,看来赚了不少金币!!!"<<endl;
		cout<<"你赢了!!!"<<endl;
	}
	else if(jinbi==chu)
	{
		cout<<"你现在的金币数等于初始金币数!"<<endl;
		cout<<"你白干了!!!"<<endl;
	}
	else if(jinbi<chu)
	{
	cout<<"你现在的金币数小于初始金币数,看来亏了不少金币!!!"<<endl;
		cout<<"你输了!!!"<<endl;	
	}
}
	else if(A==8)
	{
			cout<<"                    *********      /\\  "<<endl;
	cout<<"     ************   *       *     /* \\  "<<endl;
	cout<<" *****          *****      **    /*  \\ "<<endl;
	cout<<"**                  *     * *   /  * /  "<<endl;
	cout<<"*      ********     *       *  / ** /   "<<endl;
	cout<<"*    ***      ***   ********* /_*__/     "<<endl;
	cout<<"*    *           ***         / *   \\    "<<endl;
	cout<<"*     *             *********\\__*__/    "<<endl;
	cout<<"*      *                     / */        "<<endl;
	cout<<"*       ********************/* /         "<<endl;
	cout<<"*                   *      /__/          "<<endl;
	cout<<"*                   *                    "<<endl;
	cout<<"*********************                    "<<endl;
	cout<<"*        * *        *                    "<<endl;
	cout<<"*       *  *       *                     "<<endl;
	cout<<"*      *   *      *                      "<<endl;
	cout<<"*     *    *     *                       "<<endl;
	cout<<"*    *     *    *                        "<<endl;
	cout<<"*   *      *   *                         "<<endl;
	cout<<"*****      *****        "<<endl;
	}
	else if(A==9)
	{
		cout<<"分数>=100成为第一。"<<endl;
		    srand(time(0));
    int w=0;
    int t=0;
    int i=0;
    while(i<1)
    {
    int a=rand()%1000000+1;
    int b=rand()%1000000+1;
    cout <<a <<"+"<<b <<"="<<"(0结束)";
    int t1=time(0);
    int q;
    cin >>q;
    int t2=time(0);
    t+=t2-t1;
    if (a+b==q&&q!=0)
    {
    	cout <<"答对了,你真棒!○( ^皿^)っHiahiahia…"<<"挑战共用时"<<t<<"秒"<<endl;
    	w+=10;
    }
    else if(q!=0)
    {
    	cout <<"答错了,正确答案是:" <<a+b <<"___*(  ̄皿 ̄)/#____"<<endl;
    	w-=5;
    }
    if(q==0)
    {
    	cout<<"下次再来玩吧。分数为"<<w<<endl;
    	i=1;
    }
    if(t<20&&q!=0)
    	{
    		cout <<"手速太快了,简直是神!😆";
    	
    	}
    	else if(t>75&&t!=0)
    	{
    		cout <<"手速有点慢,继续努力😥";
    		
    	}
    if (w>=100)
    {
    	cout <<"恭喜你,挑战成功,成为第一~~~///(^v^)\\\~~~"<<"挑战共用时"<<t<<"秒";
    	i=1;
    }
    if (w<=0&&q!=0)
    {
    	cout <<"你的分数低于0,对不起,挑战失败,再接再厉┭┮﹏┭┮";
    	i=1;
	}
    }
	}
	else if(A==10)
	{
		clear();
			cout << "战斗开始,请选择难度:" << endl;
	cout << "1.简单  2.普通  3.困难  4.硬核  5.噩梦  6.地狱  7.深渊" << endl;
	int z;
	cin >> z;
	int yhp = 0;
	int chp = 0;
	if(z == 1)
	{
		yhp += 1000;
		chp=1500;
	}
	else if(z == 2)
	{
		yhp += 750;
		chp += 2000;
	}
	else if(z == 3)
	{
		yhp += 500;
		chp += 2250;
	}
	else if(z == 4)
	{
		yhp += 200;
		chp += 3500;
	}
	else if(z == 5)
	{
		yhp += 500;
		chp += 7000;
	}
	else if(z == 6)
	{
		yhp += 500;
		chp += 9999;
	}
	else if(z == 7)
	{
		yhp += 250;
		chp += 10000;
	}
	else if(z == 8)
	{
		yhp += 500;
		chp += 20000;
	}
	else
	{
		cout<< "II 没有这个选项,请重新开始选择! II"<<endl;
		cout << "----------------------------------------" << endl;
		if(z == 1)
		{
			yhp += 1000;
			chp=1500;
		}
		else if(z == 2)
		{
			yhp += 750;
			chp += 2000;
		}
		else if(z == 3)
		{
			yhp += 500;
			chp += 2250;
		}
		else if(z == 4)
		{
			yhp += 200;
			chp += 3500;
		}
		else if(z == 5)
		{
			yhp += 500;
			chp += 7000;
		}
		else if(z == 6)
		{
			yhp += 500;
			chp += 9999;
		}
		else if(z == 7)
		{
			yhp += 250;
			chp += 10000;
		}
		else if(z == 8)
		{
			yhp += 500;
			chp += 20000;
		}
		else
		{
			cout<< "II 没有这个选项,请重新开始选择! II"<<endl;
			cout << "----------------------------------------" << endl;
			return 0;
		}
	}
	int aaa = 0;
	int lan = 2000;
	int du = 0;
	int tuy = 0; 
	for(int i = 1; true; i++)
	{
		if(lan<=0) 
		{
			cout <<"法术值不足,请重新开始!";
			continue;
		}
		clear();
		cout<<"你的血量:" <<yhp<<endl<<"电脑血量:"<<chp<<endl<<"剩余法术值:"<<lan<<endl<<"毒素层数:"<<du<<endl<<"护盾值:"<<tuy<<endl; 
		cout<<"1.普攻:恢复5生命,恢复25法术值,造成10点伤害"<<endl;
		cout<<"2.恢复:恢复30生命,消耗10法术值,造成0点伤害"<<endl;
		cout<<"3.火遁|火球术:恢复3生命,消耗33法术值,造成66点伤害"<<endl;
		cout<<"4.咒印|剧毒:消耗44法术值,造成25点伤害,毒素叠加一点,伤害每回合造成4伤害"<<endl;
		cout<<"5.土遁|地动:恢复15生命,消耗55法术值,护盾生命为自身生命值的50%"<<endl;
		cout<<"6.召唤物攻击:恢复5生命,消耗50法术值,造成75点伤害"<<endl;
		cout<<"7.恢复法术值:恢复15生命,恢复66法术值,造成0点伤害"<<endl;
		cout<<"8.替身术:恢复66生命,消耗150法术值,造成85点伤害"<< endl;
		cout<<"9.影袭:恢复50生命,消耗200法术值,造成100伤害"<< endl;
		cout<<"10.斩空波:扣除50生命,消耗300法术值,造成666伤害!"<< endl;
		cout<<"11.反手里剑:扣除100生命,消耗1000法术值,造成1000伤害!"<<endl;
		cout<<"12.苦无:扣除10生命,消耗30法术值,造成50伤害"<<endl;
		cout<<"13.螺旋丸:恢复15生命,消耗50法术值,造成25伤害"<<endl;
		cout<<"14.献祭:扣除175生命,恢复300法术值,造成50伤害"<<endl;
		cout<<"15.‘写轮眼’|三勾玉:扣除100生命,消耗250法术值,造成225点伤害"<<endl;
		cout<<"16.‘写轮眼’|万花筒:扣除200生命,消耗500法术值,造成675伤害"<<endl;
		cout<<"17.九尾术:扣除500生命,消耗500法术值,造成1000伤害,叠加毒素10点"<<endl;
		cout<<"18.水土转生:恢复500生命,消耗500法术值,造成250伤害,毒素减少5点"<<endl;
		cout<<"19.白眼:恢复50生命,消耗25法术值,造成10伤害"<<endl;
		cout<<"20.雾影:恢复100生命,消耗100法术值,造成75伤害"<<endl;
		cout<<"21.飞雷神:扣除50生命,消耗200法术值,造成350伤害"<<endl;
		cout<<"22.地爆天星:扣除500生命,恢复200法术值,造成375伤害"<<endl;
		cout<<"23:尾兽行星手里剑:恢复200生命,消耗1000法术值,造成1500伤害"<<endl;
		cout<<"24.时空间多重连丸:扣除10生命,消耗200法术值,造成300伤害"<<endl;
		cout<<""<<endl;
		cin>>aaa;
		if(lan<=0)
		{
			cout << "法术值不足!请重新开始!"<<endl;
			continue;
		}
		if(aaa==1)
		{
			yhp+=5;
			chp-=10;
			lan+=25;
		} 
		if(aaa==2)
		{
			yhp+=30;
			lan-=10;
		}
		if(aaa==3)
		{
			yhp+=3;
			lan-=33;
			chp-=66;
		}
		if(aaa==4)
		{
			lan-=44;
			chp-=25;
			du++;
		}
		if(aaa==5)
		{
			yhp+=15;
			lan-=55;
			tuy+=yhp/2;
		}
		if(aaa==6)
		{
			yhp+=5;
			lan-=50;
			chp-=75;
		}
		if(aaa==7)
		{
			yhp+=15;
			lan+=66;
		}
		if(aaa==8)
		{
			yhp+=66;
			lan-=150;
			chp -= 85;
		}
		if(aaa==9)
		{
			yhp+=50;
			lan-=200;
			chp-=100;
		}
		if(aaa==10)
		{
			yhp-=50;
			lan-=300;
			chp-=666;
		}
		if (aaa==11)
		{
			yhp-=100;
			lan-=1000;
			chp-=1000;
		}
		if(aaa==12)
		{
			yhp-=10;
			lan-=30;
			chp-=50;
		}
		if(aaa==13)
		{
			yhp+=15;
			lan-=50;
			chp-=25;
		}
		if(aaa==14)
		{
			yhp-=175;
			lan+=300;
			chp-=50;
		}
		if(aaa==15)
		{
			yhp-=100;
			lan-=250;
			chp-=225;
		}
		if(aaa==16)
		{
			yhp-=200;
			lan-=500;
			chp-=675;
		}
		if(aaa==17)
		{
			yhp-=500;
			lan-=500;
			chp-=1000;
			du+=10;
		}
		if(aaa==18)
		{
			yhp+=500;
			lan-=500;
			chp-=250;
			du-=5;
		}
		if(aaa==19)
		{
			yhp+=50;
			lan-=25;
			chp-=10;
		}
		if(aaa==20)
		{
			yhp+=100;
			lan-=100;
			chp-=75;
		}
		if(aaa==21)
		{
			yhp-=100;
			lan-=200;
			chp-=350;
		}
		if(aaa==22)
		{
			yhp-=500;
			lan+=200;
			chp-=375;
		}
		if(aaa==23)
		{
			yhp+=200;
			lan-=1000;
			chp-=1500;
		}
		if(aaa==24)
		{
			yhp-=10;
			lan-=200;
			chp-=300;
		}
		if(lan<=0)
		{
			cout << "法术值不足!请重新开始!"<<endl;
			continue;
		
		}
		chp-=du*4;
		//电脑攻击 
		if(tuy==0)
		{
			yhp-=50;
			
		}
		else if(tuy<50)
		{
			yhp-=50-tuy;
			tuy=0;
		}
		else
		{
			tuy-=50;
		}
		if(z==4)
		{
			yhp-=10;
		}
	
		if(yhp<=0)
		{
			cout<<"你输了!";
			break;
		}
		if(chp<=0)
		{
			cout<<"你赢了!";
			break;
		}
	}
	}
	else if(A==11)
	{
			string password;
	cout << "请输入密码:";
	cin >> password;
	if(password == "114666888")
	{
		cout << "欢迎贵客!\n";
		recursion();
	}
	else
	{
		cout << "密码错误!";
	}
	}
	else if(A==12)
	{
		   Question questions[10];
    initQuestions(questions);
    
    int numQuestions = sizeof(questions) / sizeof(questions[0]);
    int score = 0;
    
    // 遍历所有问题
    for (int i = 0; i < numQuestions; i++) {
        cout << "Question " << i+1 << ": " << questions[i].question << endl;
        
        string userAnswer;
        cout << "Your answer: ";
        cin >> userAnswer;
        
        if (userAnswer == questions[i].answer) {
            cout << "Correct answer!" << endl;
            score++;
        } else {
            cout << "Wrong answer. The correct answer is: " << questions[i].answer << endl;
        }
        
        cout << std::endl;
    }
    
    cout << "Game over! Your final score is: " << score << "/" << numQuestions << endl;
	}
	else if(A==13)
	{
		  cout << "欢迎来到愤怒的皮皮!" << endl;
    sleep(1);
    cout << "你的目标是炸毁那些堡垒!" << endl;
    sleep(1);
    
    int n;
    srand(time(0));
    int sum = 0;                   // 总分计数器
    int bg = time (0);             // 记录开始时间
    for (int t = 1; t <= 999; t++)
    {
        cout << "来!第" << t << "个堡垒!" << endl;
        int score = 0;             // 单次得分计数器
        int dis = rand() % 8 + 3;  // 到目标距离
        int n = rand() % 5 + 3;    // 堡垒大小
        
        int num = rand() % 2;           // 随机产生正方形或平行四边形两种堡垒:0表示正方形堡垒,1表示平行四边形堡垒
        // cin >> num;
        if (num == 0)                   // 0表示正方形堡垒
        {
            // 1.1 打印爆破之前的正方形堡垒图
            for (int i = 1; i <= n; i++)          // 总共有n行
            {
                for (int j = 1; j <= dis; j++)    // 每行前dis列先打印空格 
                {
                    if (i == n && j == 1)         // 打印前dis列的左下角的时候输出炮,其余都输出空格
                    {
                        cout << "➹";
                    }
                    else
                    {
                        cout << " ";
                    }
                }
                for (int j = 1; j <= n; j++)      // 接下来的n列输出#
                {
                    cout << "#";
                }
                cout << endl;
            }
           
            cout << "设置瞄准高度:" << endl;
            int x, y;
            cin >> x;
            x = n - x + 1;           // 高度和行坐标恰好相反,需要计算出来反过来的x
            
            cout << "设置远攻距离:" << endl;   
            cin >> y;                // 远攻距离y, 远攻距离为距左边的空格数
            y = y - dis;             // 由于打印图形是拼接的,实际处理爆炸范围需要减去空格数dis
            
            // 1.2 打印爆破之后的正方形堡垒图
            int lk = rand() % 3 + 1; // 设置爆炸范围,爆炸范围是1~3的随机数
            for (int i = 1; i <= n; i++)   
            {
                for (int j = 1; j <= dis; j++)
                {
                    if (i == n && j == 1)  // 打印到左下角的时候输出炮,其余都输出空格
                    {
                        cout << "➹"; 
                    }
                    else
                    {
                        cout << " ";
                    }
                }
                
                for (int j = 1; j <= n; j++)               // 输出轰炸之后的图形
                {
                    if ( abs(i - x) + abs(j - y) <= lk)   // 曼哈顿距离在lk以内的输出*,表示被炸到了;否则输出#
                    {
                        cout << "*";
                        score++;       // 记录得分
                    }
                    else
                    {
                        cout << "#";   // 未被轰炸的地方原样输出
                    }
                }
                cout << endl;
            }
            cout << "【本次得分" << score  << "分】" << endl;
            sleep(2);
            clear();  // 清屏
        }
        else if (num == 1)                       // 1表示平行四边形堡垒
        {
            // 2.1 打印爆破之前的平行四边形堡垒图
            for (int i = 1; i <= n; i++)         // 总共有n行
            {
                for (int j = 1; j <= dis; j++)   // 每行前dis列先打印空格 
                {   
                    if (i == n && j == 1)        // 打印前dis列的左下角的时候输出炮,其余都输出空格
                    {
                        cout << "➹";    
                    }
                    else
                    {
                        cout << " ";
                    }
                    
                }
                for (int j = 1; j <= n - i + 1; j++)    // 平行四边形每行额外输出上三角形的空格
                    cout << " ";
                for (int j = 1; j <= n; j++)            // 接下来的n列输出#
                    cout << "#";
                cout << endl;
            }
           
            cout << "设置瞄准高度:" << endl;
            int x, y;
            cin >> x;
            x = n - x + 1;               // 高度和行坐标恰好相反,需要计算出来反过来的x
            
            cout << "设置远攻距离:" << endl;
            cin >> y;                    // 远攻距离y, 远攻距离为距左边的空格数
            y = y - dis;                 // 由于打印图形是拼接的,实际处理爆炸范围需要减去空格数dis
            y -= n - x + 1;
            
            // 2.2 打印爆破之后的平行四边形堡垒图
            int lk = rand() % 3 + 1;     // 设置爆炸范围,爆炸范围是1~3的随机数
            for (int i = 1; i <= n; i++) 
            {
                for (int j = 1; j <= dis; j++)
                {
                    if (i == n && j == 1)                // 打印到左下角的时候输出炮,其余都输出空格
                    {
                        cout << "➹";
                    }
                    else
                    {
                        cout << " ";
                    }
                }
                for (int j = 1; j <= n - i + 1; j++)     // 输出此行上三角的空格个数
                {
                    cout << " ";
                }
                for (int j = 1; j <= n; j++)             // 输出轰炸之后的图形
                {
                    if ( abs(i - x) + abs(j - y) <= lk) // 曼哈顿距离在lk以内的输出*,表示被炸到了;否则输出#
                    {
                        cout << "*";
                        score++;        // 记录得分
                    }
                    else
                    {
                        cout << "#";    // 未被轰炸的地方原样输出
                    }
                }
                cout << endl;
            }
            cout << "【本次得分" << score  << "分】" << endl;
            sleep(2);
            clear();  // 清屏
        }
        
        sum += score;       // 累计每一轮获得的分数
        int now = time(0);  // 记录结束时间
        if (now - bg >= 30) // 游戏时间 >= 30,游戏结束
        {
            t = 10000;
        }
    }
    cout << "游戏结束,总分" << sum << "分" << endl;
	}
	else if(A==14)
	{
	intro();
    int tme = typewritting();
    cout << "\033c" << flush;
    cout << "对: " << correct << " 错: " << wrong << "\n";
    cout << "总用时" << tme << " 秒" << "\n";
    cout << "你太厉害了!" << endl;

	}
	else if(A==15)
	{
			cout << "欢迎来到战争世界!" << endl;
	cout << "要开始游戏吗?" << endl;
	cout << "1要 2不要";
	int a_;
	cin >> a_;
	if (a_ == 1)
	{
		cout << "好的,游戏开始!" << endl;
		cout << "你要去哪?" << endl;
		cout << "1城市 2海港 3密室 4大厦 5无人区" << endl;
		int b_;
		cin >> b_;
		if (b_ == 3)
		{
			cout << "密室监控看到你,向你发射子弹,你被射死了。";
		}
		else if (b_ == 2)
		{
			cout << "你来到了一艘轮船上。" << endl;
			cout << "听到远处枪声阵阵,你迅速赶了过去。" << endl;
			cout << "原来是一个集装箱,上面有特等空投,大家在抢它呢。" << endl;
			cout << "你要去抢吗?1要去 2不去" << endl;
			int c_;
			cin >> c_;
			if (c_ == 1)
			{
				cout << "你在枪声中死掉了。" << endl;
			}	
			else if (c_ == 2)
			{
				cout << "你做出了聪明的选择,奖励:1把加特林、1把MC74、20个手榴弹" << endl;
				cout << "你想回到轮船上,船开走了。" << endl;
				cout << "是否用无线广播叫轮船回来?1叫回来 2算了" << endl;
				int d_;
				cin >> d_;
				if (d_ == 1)
				{
					cout << "你在翻呢,几个人冲过来把你干掉了。" << endl;
				}
				else	
				{
					cout << "你错过了轮船,至少等1小时。";
					cout << "几个人冲了过来,想干你。" << endl;
					cout << "你要干嘛?1逃跑 2迎战";
					int e_;
					cin >> e_;
					if (e_ == 1)
					{
						cout << "没用,他们把你包围了,你寡不敌众,变盒子了。" << endl;
					}
					else
					{
						cout << "你用啥武器?1加特林 2MC74 3G63Y 4手榴弹";
						int f_;
						cin >> f_;
						if (f_ == 1 || f_ == 3)
						{
							cout << "没用,你在翻呢,他们冲过来把你干掉了。" << endl;
						}
						else if (f_ == 2)
						{
							cout << "你把那几个人干了,从他们身上搜出了空投。" << endl;
							cout << "里面啥都没有!" << endl;
							cout << "忽然,轰的一声,末影龙出现,你被吃了。" << endl;
						}
						else if(f_ == 4)
						{
							cout << "你把那几个人干了,从他们身上搜出了被烧焦的空投。" << endl;
							cout << "里面啥都没有!" << endl;
							cout << "忽然,轰的一声,末影龙出现,你怎么办?1一个字:跑 2 AK47 3 SDM2" << endl;
							int sss;
							cin >> sss;
							if (sss == 2)
								cout << "射的有点慢,你被它咬死了。" << endl;
							else if (sss == 3)
								cout << "任务完成了!" << endl;
							else if (sss == 1)
								cout << "你有点慢,你死了。" << endl;
						}
					}
				}
			}
			
		}
		else if (b_ == 1)
		{
			cout << "不知什么事,城市地震,你被埋了。";
			cout << "你要求救吗?1要 2不要" << endl;
			int g_;
			cin >> g_;
			if (g_ == 1)
			{
				cout << "救生人员接受到你的求救信号,来救你了。你被救了。" << endl;
				cout << "你的子弹掉光了,只剩MW24和手榴弹(因为你把MW24的子弹放到了背包里)" << endl;
				cout << "你修整了一会,又去吃鸡了。" << endl;
				cout << "出现怪物万圣节魔鬼,你要干什么?1离开 2迎战" << endl;
				int h_;
				cin >> h_;
				if (h_ == 1)
				{
					cout << "没用,怪物太快,你被吃了。" << endl;
				}
				else
				{
					cout << "你用啥武器?1MW24 2手榴弹 3P85" << endl;
					int k_;
					cin >> k_;
					if (k_ != 1)
					{
						cout << "没用,你在翻呢。怪物太快,你被吃了。";
					}
					else
						cout << "怪物翻了,你赢了。任务完成了!" << endl;
				}
				
				int h__;
				cin >> h__;
				if (h__ == 1)
				{
					cout << "没用,怪物太快,你被吃了。" << endl;
					
				}
				else
				{
					cout << "你用啥武器?1MW24 2手榴弹 3P85" << endl;
					int k__;
					cin >> k__;
					if (k__ != 2)
					{
						cout << "没用,你在翻呢。怪物太快,你被吃了。";
					
					}
					else
						cout << "怪物被你炸死了,你赢了。任务完成了!" << endl;
				}
			}
		}
		else if (b_ == 4)
		{
			cout << "你发现大厦里有枪声,于是你进了那层楼。" << endl;
			cout << "5个房间,去哪个?";
			int l_;
			cin >> l_;
			if(l_ == 3)
			{
				cout << "你进去了,果然是有强盗。" << endl;
				cout << "你要用啥武器? 1加特林 2CW66 3E232";
				int m_;
				cin >> m_;
				if(m_ == 1)
					cout << "你用加特林打死了强盗,任务完成了!" << endl;
				else
				{
					cout << "你在翻呢,强盗把你轰死了" << endl;
				
				}
			}
			else
			{
				cout << "没人,你被强盗发现了,你死了。" << endl;
				
			}
		}
		if(b_ == 5)
		{
			cout << "你运气很好,捡到了空投" << endl;
			cout << "里面有10个手雷、一把AK47、1辆吉普车" << endl; 
			cout << "Oh! No!敌人来袭!";
			cout << "交战中……";
			cout << "敌人在翻" << endl;
			cout << "你怎么办?1手雷 2AK47";
			int z_;
			cin >> z_;
			if(z_ == 1)
			{
				cout << "你炸死了他" << endl;
				cout << "任务完成!" << endl;
			}
			else
			{
				cout << "你也正在翻" << endl;
				cout << "敌人翻完了!!!!!!!!!!!" << endl;
				cout << "YOU DIED!" << endl;
			}
		}
		cout << "想玩选择赛吗?1想2不想";
		int data;
		cin >> data;
		if(data == 2)
			cout << "谢谢光临!";
		else
		{
			cout << "你去了迪斯尔摩天大厦。" << endl;
			cout << "强盗在5楼或者6楼,你去哪间? 501、502、503、504、505、601、602、603、604、605。(一堆选项)" << endl;
			int dataspace;
			cin >> dataspace;
			if(dataspace == 504 || dataspace == 505 || dataspace == 602 || dataspace == 604)
				cout << "你打死了自称“不死人”的强盗!奖励500硬币\n";
			else if(dataspace == 502 || dataspace == 503 || dataspace == 603)
				cout << "你打死了自称“翼龙”的强盗!奖励800硬币\n";
			else
				cout << "啥都没有,你被发现了,你死了\n";
		}
	}
	
	else
	{
		cout << "谢谢光临!";
	}
	}
	else if(A==16)
	{
		 int k=1,m,n;
    while(true)
    {
    	cout<<0;
    	for(int i=0;i<=15;i++)
    	{
    		printf("%d ",i/10);
    	}
    	cout<<"\n0";
    	for(int i=0;i<=15;i++)
    	{
    		printf("%d ",i%10);
    	}
    	cout<<"\n";
    	for(int i=1;i<=15;i++)
    	{
    		printf("%02d ",i);
	    	for(int j=1;j<=14;j++)
	    	{
	    		if(a[i*15+j-15]==0)cout<<"+-";
	    		else cout<<d[a[i*15+j-15]]<<"-";
	    	}
	    	if(a[i*15]==0)cout<<"+\n";
	    	else cout<<d[a[i*15]]<<"\n";
    	}
    	int h;
	  	printf("请玩家%d输入",k);
	   	cin>>m>>n;
	    h=15*(m-1)+n;
	    if(a[h]!=0||m>15||n>15||m<=0||n<=0)
    	while(1)
    	{
	    	printf("请玩家%d重新输入",k);
	    	cin>>m>>n;
	    	h=15*(m-1)+n;
	    	if(a[h]==0&&n<=15&&m<=15&&n>0&&m>0)break;
    	}
    	a[h]=k;
    	cout<<"\033c";
    	int maxn=1,x=0;
    	
    	for(int i=1;i<=4;i++)
    	{
    		x+=(a[h]==a[h+i])+(a[h]==a[h-i]);
    	}
    	maxn=max(maxn,x);
    	
    	x=0;
    	for(int i=1;i<=4;i++)
    	{
    		x+=(a[h]==a[h+i*15])+(a[h]==a[h-i*15]);
    	}
    	maxn=max(maxn,x);
    	
    	x=0;
    	for(int i=1;i<=4;i++)
    	{
    		x+=(a[h]==a[h+i*14])+(a[h]==a[h-i*16]);
    	}
    	maxn=max(maxn,x);
    	
    	x=0;
    	for(int i=1;i<=4;i++)
    	{
    		x+=(a[h]==a[h+i*16])+(a[h]==a[h-i*14]);
    	}
    	maxn=max(maxn,x);
    	if(maxn>=4)
    	{
	    	printf("玩家%d胜利",k);
    		break;
    	}
	    if(k==1)k=2;
	   	else k=1;
    }
	}
	else if(A==17)
	{
		 printf("小伙捡到一沓钱,以为捡到的是美元\n翻过了一看是冥币,小伙直呼真晦气\n这冥币只要你一碰,半夜女鬼来索命\n小伙嘴角微微笑,转身来到一寺庙\n小伙丝毫也不慌,把冥币投进功德箱\n半夜女鬼真来到,发现自己中了套\n寺庙佛祖金光闪,女鬼吓得腿都软\n佛祖打出五连鞭,打得女鬼直冒烟\n佛祖骂她神经病,赶上寺庙来索命\n骂完觉得还不爽,还打出降龙十八掌\n\n不知过了多少天,女鬼重现人世间\n这次目的就一个,要让小伙死俏俏\n小伙也是很鸡贼,知道自己要倒霉\n于是掏出新手机,点开美团APP\n女鬼不知上了当,变成外卖小哥的模样\n顺着地址找上门,却直接吓得丢了魂\n外卖地址是茅山,里面全部是上仙\n上仙说女鬼太猖狂,敢来茅山耍流氓\n于是掏出桃木剑,一路火花带闪电\n\n不知过了多少天,女鬼再现人世间\n这会女鬼变小心,直接录了一段音\n这段录音很诡异,谁听立马就嗝屁\n谁知小伙不上当,把录音传到l网上\n接下来操作有点狠,把录音转发到日本\n隔天此时上新闻,整个岛国变成坟\n阎王此时也慌了神,咋死的全是日本人\n");
		 sleep(3);
	}
	else if(A==0)
	{
		j=B+1;
		if(j=10000000000)
		{
			cout<<"再见ヾ( ̄▽ ̄)Bye~Bye~!"<<endl;
		}
	}
	else if(A==18)
	{
		double tot;
	int t = -1e9;
	cout<<"welcome to my test!"<<endl;
	cout<<"ready"<<endl;
	sleep(1);
	cout<<"3"<<endl;
	sleep(1);
	clear();
	cout<<"2"<<endl;
	sleep(1);
	clear();
	cout<<"1"<<endl;
	sleep(1);
	clear();
	cout<<"start"<<endl;
	int cnt=0;
	while(cnt=10)
	{
		cnt++;
    	double a,b,d;
    	int t1,t2;
    	srand(time(0));
    	a = rand()%101+1;
    	b = rand()%101+1;
    	int e,f,g,h;
    	e = rand()%10+1;
    	f = rand()%10+1;
    	g = rand()%25+1;
    	h = rand()%10+1;
    	d = rand()%9;
    	if (d == 0)
    	{
	    	cout<<a<<"+"<<b<<"=";
	    	t1 = time(0);
    		int c;
    		cin >> c;
    		t2 = time(0);
    		t = (t2 - t1);
    		if (c == a+b)
    		{
    			cout<<"答对了"<<endl;
    			cout<<"时间为"<<t<<endl;
    			tot += 1.5;
    		}
    		else
    		{
    			cout<<"再来一次";
    			cin >> c;
    			if (c == a+b)
    			{
    				cout<<"答对了"<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot += 0.5;
    			}
    			else
    			{
    				cout<<"答错了,正确答案是"<<a+b<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot -= 1;
    			}
    		}
    	}
    	else if (d == 1)
    	{
    		if (a > b)
    		{
    			cout<<a<<"-"<<b<<"=";
	    		t1 = time(0);
    			int c;
    			cin >> c;
    			t2 = time(0);
    			t = (t2 - t1);
    			if (c == a-b)
    			{
    				cout<<"答对了"<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot += 1.5;
    			}
    			else
    			{
    				cout<<"再来一次";
    				cin >> c;
    				if (c == a-b)
    				{
    					cout<<"答对了"<<endl;
    					cout<<"时间为"<<t<<endl;
    					tot += 0.5;
    				}
    				else
    				{
    					cout<<"答错了,正确答案是"<<a+b<<endl;
    					cout<<"时间为"<<t<<endl;
    					tot -= 1;
    				}
    			}
    		}
    		else 
    		{
    			cout<<b<<"-"<<a<<"=";
	    		t1 = time(0);
    			int c;
    			cin >> c;
    			t2 = time(0);
    			t = (t2 - t1);
    			if (c == b-a)
    			{
    				cout<<"答对了"<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot += 1.5;
    			}
    			else
    			{
    				cout<<"再来一次";
    				cin >> c;
    				if (c == b-a)
    				{
    					cout<<"答对了"<<endl;
    					cout<<"时间为"<<t<<endl;
    					tot += 0.5;
    				}
    				else
    				{
    					cout<<"答错了,正确答案是"<<a+b<<endl;
    					cout<<"时间为"<<t<<endl;
    					tot -= 1;
    				}    					
    			}
    		}
    	}
    	else if (d == 2)
    	{
    		cout<<e<<"*"<<f<<"=";
    		t1 = time(0);
    		int c;
    		cin >> c;
    		t2 = time(0);
    		t = (t2 - t1);
    		if (c == e*f)
    		{
    			cout<<"答对了"<<endl;
    			cout<<"时间为"<<t<<endl;
    			tot += 1.5;
    		}
    		else
    		{
    			cout<<"再来一次";
    			cin >> c;
    			if (c == e*f)
    			{
    				cout<<"答对了"<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot += 0.5;
    			}
    			else
    			{
    				cout<<"答错了,正确答案是"<<a+b<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot -= 1;
    			}
    		}
    	}
    	else if(d==3)
    	{
    		cout<<"修复中";
    		tot += 3;
    	    cout<<g<<"/"<<h<<"=";
    	    int n = int(g/h);
    		t1 = time(0);
    		double c;
    		cin >> c;
    		t2 = time(0);
    		t = (t2 - t1);
    		if (c == n)
    		{
    			cout<<"答对了"<<endl;
    			cout<<"时间为"<<t<<endl;
    			tot += 5;
    		}
    		else
    		{
    			cout<<"再来一次";
    			cin >> c;
    			if (c == n)
    			{
    				cout<<"答对了"<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot += 2.5;
    			}
    			else
    			{
    				cout<<"答错了,正确答案是"<<n<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot -= 0;
    			}
    		}
    	}
    	else if(d==4)
    	{
    	    cout<<a<<"+"<<b<<"-"<<e<<"=";
    		t1 = time(0);
    		int c;
    		cin >> c;
    		t2 = time(0);
    		t = (t2 - t1);
    		if (c == a+b-e)
    		{
    			cout<<"答对了"<<endl;
    			cout<<"时间为"<<t<<endl;
    			tot += 2;
    		}
    		else
    		{
    			cout<<"再来一次";
    			cin >> c;
    			if (c == a+b-e)
    			{
    				cout<<"答对了"<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot += 1.3;
    			}
    			else
    			{
    				cout<<"答错了,正确答案是"<<a+b<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot -= 1;
    			}
    		}
    	}
    	else if(d==5)
    	{
    	    cout<<"("<<e<<"+"<<f<<")"<<"*"<<h<<"=";
    		t1 = time(0);
    		double c;
    		cin >> c;
    		t2 = time(0);
    		t = (t2 - t1);
    		if (c == (e+f)*h)
    		{
    			cout<<"答对了"<<endl;
    			cout<<"时间为"<<t<<endl;
    			tot += 2;
    		}
    		else
    		{
    			cout<<"再来一次";
    			cin >> c;
    			if (c == (e+f)*h)
    			{
    				cout<<"答对了"<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot += 1.3;
    			}
    			else
    			{
    				cout<<"答错了,正确答案是"<<a+b<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot -= 1;
    			}
    		}
    	} 
    	else if(d==6)
    	{
    		cout<<"修复中";
    		tot += 3;    		
    	    cout<<"("<<e<<"+"<<f<<")"<<"/"<<h<<"=";
    		t1 = time(0);
    		double c;
    		cin >> c;
    		t2 = time(0);
    		t = (t2 - t1);
    		if (c == (e+f)/h)
    		{
    			cout<<"答对了"<<endl;
    			cout<<"时间为"<<t<<endl;
    			tot += 1.7;
    		}
    		else
    		{
    			cout<<"再来一次";
    			cin >> c;
    			if (c == (e+f)/h)
    			{
    				cout<<"答对了"<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot += 0.7;
    			}
    			else
    			{
    				cout<<"答错了,正确答案是"<<a+b<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot -= 1;
    			}
    		}
    	} 
    	else if(d==7)
    	{
    	    cout<<"("<<e<<"*"<<f<<"-"<<g<<")"<<"+"<<a+b<<"=";
    		t1 = time(0);
    		double c;
    		cin >> c;
    		t2 = time(0);
    		t = (t2 - t1);
    		if (c == (e*f-g)+(a+b))
    		{
    			cout<<"答对了"<<endl;
    			cout<<"时间为"<<t<<endl;
    			tot += 2.7;
    		}
    		else
    		{
    			cout<<"再来一次";
    			cin >> c;
    			if (c == (e*f-g)+(a+b))
    			{
    				cout<<"答对了"<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot -= 0.5;
    			}
    			else
    			{
    				cout<<"答错了,正确答案是"<<a+b<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot -= 1;
    			}
    		}
    	}
    	else if(d==8)
    	{
    	    cout<<h<<"+"<<"?"<<"="<<a;
    		t1 = time(0);
    		double c;
    		cin >> c;
    		t2 = time(0);
    		t = (t2 - t1);
    		if (c == a-h)
    		{
    			cout<<"答对了"<<endl;
    			cout<<"时间为"<<t<<endl;
    			tot += 2.7;
    		}
    		else
    		{
    			cout<<"再来一次";
    			cin >> c;
    			if (c == a-h)
    			{
    				cout<<"答对了"<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot -= 0.5;
    			}
    			else
    			{
    				cout<<"答错了,正确答案是"<<a+b<<endl;
    				cout<<"时间为"<<t<<endl;
    				tot -= 1;
    			}
    		}
    	}    	
    	if (tot >= 15)
    	{
    		cout<<"你有"<<tot<<"分"<<endl;
    		break;
    	}
    	if (tot < 0)
    	{
    		cout<<"你有"<<tot<<"分"<<endl;
    		break;
    	}
    	else
    	{
    		cout<<"你有"<<tot<<"分"<<endl;
    	}
    	if (t <= 5)
    	{
    		cout<<"大神"<<endl;
    	}
    	else if (t == 5)
    	{
    		cout<<"中等"<<endl;
    	}
    	else
    	{
    		cout<<"萌新"<<endl;
    	}
    	sleep(2);
    	clear();
	}
	}
	else if(A==19)
	{
		 // 游戏介绍
         intro1();
         // 进行游戏
         int winner;
         winner = pk();
         clear();
         // 公布对战结果
         showWinner(winner);
	}
	else if(A==20)
	{
		 int n, number, sum;
    bool flag = true;
    string str;
    srand((unsigned int)time(NULL));
    number = rand() % 20;
    cout << "准备好了吗,游戏要开始咯" << endl;
    cout << "回复“no”再准备一下,回复任意开始游戏..." << endl;
    cin >> str;
    if (str == "no" || str == "No" || str == "nO" || str == "NO")
    {
        cout << "小朋友再准备一下,欢迎下次再来玩哟~" << endl;
        exit(0);
    }
    cout << endl <<  "|游戏开始|" << endl << "你想有几次机会呢?" << endl;
    cin >> sum;
    cout << "请输入猴博士心中所想的数字(0 ~ 19),你有" << sum << "次机会哦~:";
    while (sum)
    {
        cin >> n;
        if (number > n)
        {
            cout << "↑ 猜小啦 ↑" << endl;
        }
        else if (number < n)
        {
            cout << "↓ 猜大啦 ↓" << endl;
        }
        else
        {
            cout << "猜对啦~,小朋友真棒!" << endl;
            cout << endl << "恭喜你成功完成!( ?? ω ?? )y" << endl;
            flag = false;
            break;
        }
        sum--;
        if (sum) cout << endl << "继续猜猜看,接着输入猴博士想的那个数字:" << endl;
    }
    if (flag)
    {
        cout << endl << "小朋友机会用完了哦~,猴博士心中所想的数字是: " << number << endl;
        cout << "点击下方运行再尝试一次吧~"<< endl;
    }
	}
	else if(A==21)
	{
		for(long long i=-9223372036854779808;i<=9223372036854779807;i++)
		{
		printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
		}
	}
	else if(A==22)
	{
		for(long long i=-9223372036854779808;i<=9223372036854779807;i++)
		{
		printf("从前有座山\n山里有座庙\n庙里有个老和尚在给小和尚讲故事\n讲的是什么故事呢\n");
		}
	}
	else if(A==23)
	{
		 int n;
		 printf("几乘几?(one number)");
    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= n; j++) {
            if(i==j)
            {
            cout<<"1 ";
            }
            else
            {
            cout<<"0 ";
            }
        }
        cout << endl;
    }
	}
	else if(A==24)
	{
		cout<<"给我两个数,我输出加、减、乘、除、模";
		int a, b;
    cin>>a>>b;
    cout << a + b << endl;
    cout << a - b << endl;
    cout << a * b << endl;
    cout << a / b << endl;
    cout << a % b << endl;
	}
	else if(A==25)
	{
            andchachengchu(1);
            printf("你对了%d题",cnt2);
	}
	else if(A==26)
	{
		cout<<"Enter a number(two to nine)";
		int a;
    cin>>a;
    a=a%11;
    for(int i=1;i<=a;i++)
    {
            for(int j=1;j<=a-i;j++)
            {
                cout<<" ";
            }
        for(int j=1;j<=i;j++)
        {
        cout<<j;
        }
        for(int j=i-1;j>=1;j--)
        {
        cout<<j;
        }
         for(int j=1;j<=a-i;j++)
            {
                cout<<" ";
         }
        cout<<endl;
    }
	}
	else if(A==27)
	{
		cout<<"多少?";
		int a;
		cin>>a;
		printf("\n");
		cout<<toascii(a)<<endl;
	}
	else
	{
			cout<<"没有该答案!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"<<endl;
	}
	}
	return 0;
	}

不喜勿喷

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值