c++简单大乱斗源代码(免费复制)

 #include <iostream>
#include <windows.h>
using namespace std;
char s[100]; 
int main(int argc, char** argv)
{

    int xl1,xl2;
    int gj1,gj2;
    cout<<“请创造昵称(英文名):”;
    cin>>s[10];
    Sleep(1000);
    cout<<“你好”<<s[10]<<“!”<<endl;
    Sleep(1000);
    cout<<“请选择战士:”<<endl;
    Sleep(1000);
    cout<<“1.蔡徐坤 2.陈奕迅 3.中华武将 4.莎士比亚 5.学校老师”<<endl;
    Sleep(1000);
    cin>>s[10];
    if(s[10]==’1′)
    { 
        cout<<“主武器:坤坤篮球”<<endl;
        Sleep(1000);
        cout<<“血量:100″<<endl;
        Sleep(1000);
        cout<<“攻击:20″<<endl;
        xl1=100;
        
        for(int i=1;i<=30;i++)
        {

            Sleep(1000);
            cout<<“1.去森林”<<endl;
            cout<<“2.去草原”<<endl;
            cout<<“3.去山洞”<<endl;
            cin>>s[10];
            if(s[10]=’1′)
            {

                cout<<“遇见丛林虎”<<endl;
                Sleep(1000);
                cout<<“危险指数:10″<<endl; 
                Sleep(1000);
                cout<<“打成平手,不分上下”<<endl;
                continue;
            }
            if(s[10]=’2′)
            {

                cout<<“遇见草原狮”<<endl;
                Sleep(1000);
                cout<<“危险指数:20″<<endl;
                Sleep(1000); 
                cout<<“打成平手,不分上下!”<<endl;

版权声明:本文为博主作者:2301_77283370原创文章,版权归属原作者,如果侵权,请联系我们删除!

原文链接:https://blog.csdn.net/2301_77283370/article/details/130045121

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
乘风的头像乘风管理团队
上一篇 2024年1月11日
下一篇 2024年1月11日

相关推荐