小遊戲- #include<iostream>
- #include<cstdlib>
- #include<ctime>
- using namespace std;
- int main(){
- first:
- int ace[]={100,200,300,400};
- int w[]={2000,300,900,500};
- int b[]={100,200,100,500};
- int rof[]={100,550,100,400};
- int cp[]={500,400,300,350};
- int blood[]={1000,1000,1000,1000,1000};
- int a,c;
- string player[]={"艾斯","白鬍子","黑鬍子","魯夫"};
- cout<<"你要選誰 1:艾斯 2:白鬍子 3:黑鬍子 4:魯夫"<<endl;
- cin>>a;
- if(a==1){
- ace:
- cout<<"你要出哪一招 1:火拳 2:火焰子彈 3:炎帝 4:雙重火拳"<<endl;
- cin>>c;
- if(c==1){
- goto re;
- }else if(c==2){
- goto a;
- }else if(c==3){
- goto rrr;
- }else if(c==4){
- goto h;
- }
- }else if(a==2){
- w:
- cout<<"你要出哪一招 1:地震拳擊 2:雙海嘯 3:地震波 4:大招"<<endl;
- cin>>c;
- if(c==1){
- goto d;
- }else if(c==2){
- goto e;
- }else if(c==3){
- goto f;
- }else if(c==4){
- goto g;
- }
- }else if(a==3){
- A:
- cout<<"你要出哪一招 1:閻水 2:暗穴道 3:暗黑星 4:黑洞"<<endl;
- cin>>c;
- if(c==1){
- goto i;
- }else if(c==2){
- goto j;
- }else if(c==3){
- goto k;
- }else if(c==4){
- goto l;
- }
- }else if(a==4){
- rof:
- cout<<"你要出哪一招 1:猿王槍 2:大蛇炮 3:橡膠·大猿王槍 4:猿神槍"<<endl;
- cin>>c;
- if(c==1){
- goto m;
- }else if(c==2){
- goto o;
- }else if(c==3){
- goto n;
- }else if(c==4){
- goto p;
- }
- }
-
複製代碼 |