赞
踩
直接上代码:
注意下载C++
#include<bits/stdc++.h> #include<conio.h> #include<windows.h> using namespace std; double shanghai[20]={ 0.6,1.1,2,3.16,5.5,7,10,20,50,100,146.23,254.13,312,403,601,1023}; double bosshealth[20]={ 2,3,4,5.9,8,14,19,32,73,157,200,403,801,1200,3630,20123}; double wj_shanghai=1,wj_health=10,wj_max_health=10,boss,wj_money=0; void chushihua(); void game(); void gongji(); void goumai(); void shangdian(); void zhujiemian(); void fangyu(); void cend(); void chushou(); void print(char[]); int bishou=0,caidao=0,jian=0,shenjian=0; double bishou_1=5,caidao_1=17,jian_1=58,shenjian_1=123.1; int hat=0,douhui=0,hudun=0,hunjia=0,shendun=0; double hat_1=7,douhui_1=21,hudun_1=49,hunjia_1=89,shendun_1=210.4; void cend() { system("cls"); print("GAME OVER"); exit(1); } void game() { int k; chushihua(); IO: printf("请输入对手等级 (0~15)\n"); scanf("%d",&k); if(k>15||k<0) { system("cls"); goto IO; } boss=bosshealth[k]; system("cls"); while(wj_health>=0) { srand(time(NULL)); QP: printf("1.逃跑 2.进攻\n"); char s=getch(); if(s<'1'||s>'2') { system("cls"); goto QP; } if(s=='1') { system("cls"); zhujiemian(
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。