搜索
查看: 173|回复: 2
打印 上一主题 下一主题

无法运行,谁帮我搞一下

[复制链接]
跳转到指定楼层
楼主
 楼主| 发表于 2020-2-27 20:40:48 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
5啊哈币
  1. #include <iostream>
  2. #include <stdlib.h>
  3. #include <windows.h>
  4. using namespace std;
  5. int main()
  6. {
  7.     long a[15],b,c[20],d,e;
  8.         cout<<"看什么呢,我,你爹!!!!"<<endl;
  9.         Sleep(500);
  10.         cout<<"来搞一把游戏"<<endl;
  11.         Sleep(500);
  12.         cout<<"规则:要第一项输入1;要第二项输入2;以此类推。"<<endl;
  13.         Sleep(500);
  14.         cout<<"你现在只有0.1比特币"<<endl;
  15.         Sleep(500);
  16.         cout<<"剁手 or 不买拉到"<<endl;
  17.         cin>>a[1];
  18.         if(a[1]==1)
  19.         cout<<"买什么?"<<endl;
  20.         if(a[1]==1)
  21.         Sleep(500);
  22.         if(a[1]==1)
  23.         cout<<"二营长的意大利炮 or 老八秘制小汉堡"<<endl;
  24.         if(a[1]==1)
  25.         cin>>a[2];
  26.         if(a[2]==1)
  27.         cout<<"好!"<<endl;
  28.         if(a[2]==1)
  29.         Sleep(500);
  30.         if(a[2]==1)
  31.         cout<<"你现在的情况是:血量1000000000000,攻击0.1,防御0"<<endl;
  32.         if(a[2]==1)
  33.         Sleep(500);
  34.         if(a[2]==1)
  35.         cout<<"你要往哪里冒险?"<<endl;
  36.         if(a[2]==1)
  37.         Sleep(500);
  38.         if(a[2]==1)
  39.         cout<<"东 or 西 or 南 or 北"<<endl;
  40.         if(a[2]==1)
  41.         cin>>a[3];
  42.         if(a[3]==1)
  43.         cout<<"遇到小混混,不幸身亡!!!"<<endl;
  44.         if(a[3]==2)
  45.         cout<<"遇到火灾,不幸身亡!!!"<<endl;
  46.         if(a[3]==3)
  47.         cout<<"遇到狱警,被打入大牢,不幸身亡!!!"<<endl;
  48.         if(a[3]==4)
  49.         cout<<"遇到怪兽"<<endl;
  50.         if(a[3]==4)
  51.         Sleep(500);
  52.         if(a[3]==4)
  53.         cout<<"逃 or 不逃"<<endl;
  54.         if(a[3]==4)
  55.         cin>>a[4];
  56.         if(a[4]==2)
  57.         cout<<"打他吗?"<<endl;
  58.         if(a[4]==2)
  59.         cin>>a[5];
  60.         if(a[5]==1)
  61.         cout<<"你不管打不打,都被他打死了"<<endl;
  62.         if(a[5]==2)
  63.         cout<<"你不管打不打,都被他打死了"<<endl;
  64.         if(a[4]==1)
  65.         cout<<"你跑的可真快,你来到了一个村庄"<<endl;
  66.         if(a[4]==1)
  67.         Sleep(500);
  68.         if(a[4]==1)
  69.         cout<<"有一个人想跟你做交易。同意吗?"<<endl;
  70.         if(a[4]==1)
  71.         cin>>a[6];
  72.         if(a[6]==1)
  73.         cout<<"你被他骗了。游戏结束。"<<endl;
  74.         if(a[6]==2)
  75.         cout<<"原来他是一个骗子,揍他吗?"<<endl;
  76.         if(a[6]==2)
  77.         cin>>a[7];
  78.         if(a[7]==1)
  79.         cout<<"恭喜你!!!!!!"<<endl;
  80.         if(a[7]==1)
  81.         cout<<"等一下!!!!!!"<<endl;
  82.         if(a[7]==1)
  83.         Sleep(2000);
  84.         if(a[7]==1)
  85.         cout<<"等一下哦!!!!!!"<<endl;
  86.         if(a[7]==1)
  87.         Sleep(2000);
  88.         if(a[7]==1)
  89.         cout<<"正在加载中......";
  90.         if(a[7]==1)
  91.         Sleep(2000);
  92.         if(a[7]==1)
  93.         cout<<"游戏成功!!!";
  94.         if(a[7]==2)
  95.         cout<<"这都不打!!!???游戏失败!!!";
  96.         if(a[2]==2)
  97.         cout<<"你现在的情况是:血量50,攻击0,防御0"<<endl;
  98.         if(a[2]==2)
  99.         cout<<"你遇到一个大楼。进不进去?"<<endl;
  100.         if(a[2]==2)
  101.         cin>>a[8];
  102.         if(a[8]==1)
  103.         cout<<"你被困在了里面。"<<endl;
  104.         if(a[8]==2)
  105.         cout<<"有人投奔了你,军队+10000"<<endl;
  106.         if(a[8]==2)
  107.     Sleep(2000);
  108.         if(a[8]==2)
  109.         for(b=0;b<=10000;b++)
  110.         if(a[8]==2)
  111.         cout<<b<<" ";
  112.         if(a[8]==2)
  113.         cout<<"你遇到了一个军队,是否战斗?"<<endl;
  114.         if(a[8]==2)
  115.         cin>>a[10];
  116.         if(a[10]==1)
  117.         for(d=10000;d<=0;d--);
  118.         if(a[10]==1)
  119.         cout<<d<<" ";
  120.         if(a[10]==1)
  121.         cout<<"不敌身亡.................."<<endl;
  122.         if(a[10]==2)
  123.         cout<<"遭到追击,军队死光,开始冒险。"<<endl;
  124.         if(a[10]==2)
  125.         cout<<"你要往哪里冒险?"<<endl;
  126.         if(a[10]==2)
  127.         Sleep(500);
  128.         if(a[10]==2)
  129.         cout<<"东 or 西 or 南 or 北"<<endl;
  130.         if(a[10]==2)
  131.         cin>>c[3];
  132.         if(c[3]==1)
  133.         cout<<"遇到黑帮老大,不幸身亡!!!"<<endl;
  134.         if(c[3]==2)
  135.         cout<<"遇到火灾,不幸身亡!!!"<<endl;
  136.         if(c[3]==3)
  137.         cout<<"遇到狱警,被打入大牢,被犯人锤死!!!"<<endl;
  138.         if(c[3]==4)
  139.         cout<<"遇到怪兽"<<endl;
  140.         if(c[3]==4)
  141.         cout<<"锤他吗?"<<endl;
  142.         if(c[3]==4)
  143.         cin>>c[10];
  144.         if(c[10]==1)
  145.         cout<<"游戏成功!!!"<<endl;
  146.         if(c[10]==2)
  147.         cout<<"游戏失败!!!"<<endl;
  148.         return 0;
  149. }
复制代码

沙发
发表于 2020-2-29 16:35:26 | 只看该作者
挺不错啊小伙子,可能是你的编译器出问题了
板凳
发表于 2020-2-29 16:35:53 | 只看该作者
挺不错啊小伙子,可能是你编译器出问题了,游戏还挺不错的
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

广播台
特别关注
快速回复 返回顶部 返回列表