栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > C/C++/C#

解题日常C++

C/C++/C# 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

解题日常C++

#include 
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
string a[40];
long long s=1,shengming=20,bushu=0,leiren,lx1,ly1,lx,ly,fhq=1;
const long long n=59,jg=25,dengji=0;
bool yaoshi=0,leiren2;
string p=" M!|=.123456789%&_~?Win";
long long r=1;
char f='y';
void color(int a)//打印颜色
{
    if(a==0) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
    if(a==1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
    if(a==2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
    if(a==3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
    if(a==4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
    if(a==5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
    if(a==6) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
    if(a==7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN);
    if(a==8) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
}

long long numberaio(string n){
    for (int i = 0; i < 100000; i++) {
        if(n[i]=='')
        {
            return i;
        }
    }
}
void gotoxy(int y,int x) 
{
    COORD  coord;     
    coord.X=x;         
    coord.Y=y;
    HANDLE a=GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(a,coord);    
}
void coutAIO(string b,int truefalse0 = 1,bool truefalse1 = 0){
    int i=0,s=0;
    long long a=numberaio(b);
    while(a!=0){
        s=rand()%9;
        if(a!=0&&s==0)
        {
            color(0);
            cout << b[i];
            a--;
            i++;
        }
        if(a!=0&&s==1)
        {
            color(1);
            cout << b[i];
            a--;
            i++;
        }
        if(a!=0&&s==2)
        {
            color(2);
            cout << b[i];
            a--;
            i++;
        }
        if(a!=0&&s==3)
        {
            color(3);
            cout << b[i];
            a--;
            i++;
            if(truefalse0!=false){
                Sleep(20);
            }
        }
        if(a!=0&&s==4)
        {
            color(4);
            cout << b[i];
            a--;
            i++;
        }
        if(a!=0&&s==5)
        {
            color(5);
            cout << b[i];
            a--;
            i++;
        }
        if(a!=0&&s==6)
        {
            color(6);
            cout << b[i];
            a--;
            i++;
        }
        if(a!=0&&s==7)
        {
            color(7);
            cout << b[i];
            a--;
            i++;
        }
        if(a!=0&&s==8)
        {
            color(8);
            cout << b[i];
            a--;
            i++;
        }
        if(truefalse0 ==1){
            Sleep(10);
        }
        if(truefalse0 ==2){
            Sleep(20);
        }
        if(truefalse0 ==3){
            Sleep(40);
        }
        if(truefalse0 ==4){
            Sleep(100);
        }
        if(truefalse0 ==5){
            Sleep(300);
        }
        if(truefalse0 ==6){
            Sleep(1000);
        }
    }
    if(truefalse1!=false){
        getch();
        system("cls");
    }
    cout << endl;
}
void ksjm()
{
	system("color f0");
	cout<<"按任意键开始游戏";
	getch();
	system("cls"); 
	for(long long i=1;i<=3;i++)
	{
		system("color 07");
		system("color 10");
		system("color 20");
		system("color 30");
		system("color 40");
		system("color 50");
		system("color 60");
		system("color 70");
		system("color 80");
		system("color 90");
		system("color a0");
		system("color b0");
		system("color c0");
		system("color d0");
		system("color e0");
		system("color f0");
	}
	cout<<"nnnnnnnnnnn                                                      ";
	coutAIO("走迷宫",2);
	cout<<"n";
	cout<<"                                                   ";
	coutAIO("出品:饼干,修改:努力的AIO",5);
	Sleep(1500);
} 
int start()
{
	system("cls");
	cout << "□□□□□□■□□□□□□□□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□■■□□□□□□□□□□□□□□□□□■□□" << endl;
	cout << "□□□□□□■■■□□□□□□□□□□□□□□□■■□□" << endl;
	cout << "□□□■■■■■■■■■■■■■■■□□□□■■■■□□" << endl;
	cout << "□□■□■□■□■□■□■□■□■□■■■■■■■■□□" << endl;
	cout << "□□□■■■■■■■■■■■■■■■■■■■■■■□□□" << endl;
	cout << "□□□□□□□□■■■■■□□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□■■■■■□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□■■■□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□□■■■□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□□□■■■□□□□□□□□□□□□" << endl;
	coutAIO("一天,你坐着飞机,正打算去美国...         ",3);
	Sleep(1000);
	system("cls");
	cout << "□□□□□□■□□□□□□□□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□■■□□□□□□□□□□□□□□□□□■□□" << endl;
	cout << "□□□□□□■■■□□□□□□□□□□□□□□□■■□□" << endl;
	cout << "□□□■■■■■■■■■■■■■■■□□□□■■■■□□" << endl;
	cout << "□□■□■□■□■□■□■□■□■□■■■■■■■■□□" << endl;
	cout << "□□□■■■■■■■■■■■■■■■■■■■■■■□□□" << endl;
	cout << "□□□□□□□□■■■■■□□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□■■■■■□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□■■■□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□□■■■□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□□□■■■□□□□□□□□□□□□" << endl;
	coutAIO("一边看着电影,一边喝着饮料                  ",3);
	Sleep(1000);
	system("cls");
	cout << "□□□□□□■□□□□□□□□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□■■□□□□□□□□□□□□□□□□□■□□" << endl;
	cout << "□□□□□□■■■□□□□□□□□□□□□□□□■■□□" << endl;
	cout << "□□□■■■■■■■■■■■■■■■□□□□■■■■□□" << endl;
	cout << "□□■□■□■□■□■□■□■□■□■■■■■■■■□□" << endl;
	cout << "□□□■■■■■■■■■■■■■■■■■■■■■■□□□" << endl;
	cout << "□□□□□□□□■■■■■□□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□■■■■■□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□■■■□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□□■■■□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□□□■■■□□□□□□□□□□□□" << endl;
	coutAIO("突然,飞机开始颠簸,你手中饮料摔到了地上,洒了一地         ",3);
	Sleep(1000);
	system("cls");
	cout << "□□□□□□□□□□□□□□□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□■■■■□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□■■■■■■■■□□□□□□□□□□□" << endl;
	cout << "□□□□■■■■■■□□■■□□■■■■■■□□□□□□" << endl;
	cout << "□□□□□□□□□■■■■■■■■□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□■■■■■■□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□□■■□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□□□□□□□□□□□□□□□□□□" << endl;
	coutAIO("一秒钟后,飞机开始往下坠落",3);
	Sleep(1000);
	system("cls");
	cout << "□□□□□□□□□□□□□□□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□■■■■□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□■■■■■■■■□□□□□□□□□□□" << endl;
	cout << "□□□□■■■■■■□□■■□□■■■■■■□□□□□□" << endl;
	cout << "□□□□□□□□□■■■■■■■■□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□■■■■■■□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□□■■□□□□□□□□□□□□□□" << endl;
	cout << "□□□□□□□□□□□□□□□□□□□□□□□□□□□□" << endl;
	coutAIO("行李架上的行李掉了下来,砸中了你,你眼前一黑,昏了过去...         ",3);
	Sleep(1000);
	system("cls");
	Sleep(3000);
	coutAIO("醒来后,你发现你在一个无人区,误入了迷宫。                        ");
	getch();
	return 0;
}
void start(int n)
{
	system("cls");
    cout<<"加载中请稍等";
    Sleep(1000);
    gotoxy(0,0);
	for (int i=1;i<=n; i++)
	{
		cout<<"加载中.              "< 

OK了

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/983041.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号