=ce){an.hp--;an.de--;}else{an.hp=an.hp-ce+an.de;an.de--;}if(an.hp<0){an.hp=0;}if(an.de<0){an.de=0;}cout< =ce){an.hp--;an.de--;}else{an.hp=an.hp-ce+an.de;an.de--;}if(an.hp<0){an.hp=0;}if(an.de<0){an.de=0;}cout<
登录
首页 » c++ » 玩家PK

玩家PK

于 2022-08-02 发布 文件大小:304.42 kB
0 90
下载积分: 2 下载次数: 1

代码说明:

#include #include #include #include #include #include using namespace std; class Role { protected: int hp,ce,de,fa; int flag; string nn; public: Role(string n, int h, int c, int d, int f):nn(n),hp(h),ce(c),de(d),fa(f) {} ~Role() {} void combat(Role &an) { if(fa>an.fa) { flag=1; loop2: cout

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • job
    有m台不同的机器,n个不同的工件。每个工件有多道工序,每道工序由指定的机器在固定的时间内完成。一道工序一旦开始处理,就不能中断。每台机器一次只能处理一道工序。一个调度就是决定每台机器上工序的处理顺序,使得机器完成所有工件的时间最短。具体的,该问题就是要求在满足(1)、(2)两个约束条件的前提下,确定每台机器上工序的顺序,使加工的时间跨度(从开始加工到全部工件都加工完所需要的时间)达到最小。其中,(1)表示工件约束条件:对每个工件而言,机器对它的加工路线是事先确定的;(2)表示机器约束条件:对每台机器而言,一次只能对一道工序进行加工。()
    2007-09-18 23:30:48下载
    积分:1
  • Expert-C-Programming
    《C专家编程》展示了最优秀的C程序员所使用的编码技巧,并专门开辟了一章对C++的基础知识进行了介绍。书中C的历史、语言特性、声明、数组、指针、链接、运行时、内存以及如何进一步学习C++等问题进行了细致的讲解和深入的分析。全书撷取几十个实例进行讲解,对C程序员具有非常高的实用价值。(" expert C programming" demonstrated the use of the best C programmers coding techniques, and opened up a chapter devoted to the basic knowledge of C++ are introduced. The detailed explanation and in-depth analysis of C book of history, language characteristics, statements, arrays, pointers, links, runtime, memory and learning how to further C++ such problems. The book captured dozens of examples to explain, has very high practical value for C programmers.)
    2014-04-18 20:02:52下载
    积分:1
  • 1097317117
    大理石晶化作業流程改善與標準工時量測 改善工作流程,並訂定標準工時(Marble crystallization processes to improve the measurement and standard working hours to improve the work flow, and set the standard working hours)
    2010-11-03 09:06:18下载
    积分:1
  • rotating
    desing and develop a cube rotation
    2010-12-26 18:57:19下载
    积分:1
  • HeightMap
    Opengl Heightmap and Skybox implementation
    2014-09-29 09:38:45下载
    积分:1
  • 用光线频闪传输信息
    很简易的用光线传输信息的51代码,里面有两种模式,一种是通过光线的亮灭来传输二进制编码,一种是通过光线亮的时间来传输十进制编码,现在还处于半成品阶段,我们为了能让手机的环境光传感器可以接收到光线的变化,将时间变的很慢,频闪很明显,我稍后计划用光敏三极管来做接受设备,这样就可将闪烁调整至肉眼不可见,这是我的想要达到的效果
    2022-09-27 21:20:03下载
    积分:1
  • CANreice
    比RS485更精准的can接受通信,基于128单片机开发,对于有志于128通信方面的读者有一定参考价值 (More accurate than the RS485 can accept the communication, based on 128 microcontroller development, communications for aspiring 128 readers have a certain reference value)
    2013-08-31 11:23:23下载
    积分:1
  • dianchangxunjian
    一款电厂巡检软件,很简单的C++处理程序,适合初学者使用,C++(A plant inspection software, very simple C++ handler for beginners, C++)
    2014-02-23 15:48:29下载
    积分:1
  • CAN按键收发显示
    ?A、B两块开发板上电,按开发板A上的按键S1—S4,A板将通过CAN总线向B板发送按键数字信息,B板接收到该信息后通过数码管显示出A版相应的按键值。(A, B two development board power, press the development board A button s1-s4, A board will send key digital information through CAN bus to B board, B board received the information through the digital tube display A corresponding key value.)
    2020-06-20 10:00:01下载
    积分:1
  • PieChart
    PieChart实例源码,它是用于制作三维立体饼形统计图(PieChart example source code, which is used to produce three-dimensional pie charts)
    2011-01-24 11:53:28下载
    积分:1
  • 696518资源总数
  • 105918会员总数
  • 20今日下载