跳到正文

个人记录

半成品小游戏

原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2025年12月12日
篇幅
约 2 分钟

版本

  1. v1当前
C++
#include<bits/stdc++.h>
using namespace std;
int x,y;
string s,k;
string mc[7]={"埃德森","哈兰德","德布劳内","B席","福德"};
string ml[7]={"奥纳纳","拉什福德","B费","卡塞米罗","瓦拉内"};
string bs[7]={"佩纳","莱万","佩德里","德容","拉菲尼亚"};
string yw[7]={};
int main(){
	cout<<"足球游戏"<<endl;
	cout<<"请选择球队"<<endl;
	cout<<"1.曼城,2.巴塞罗那,3.曼联,4.尤文图斯,5.切尔西"<<endl;
	cin>>x;
	if(x==1){
		s="曼城";
	}
	else if(x==2){
		s="巴塞罗那";
	}
	else if(x==3) {
		s="曼联";
	}
	else if(x==4){
		s="尤文图斯";
	}
	else if(x==5){
		s="切尔西";
	}
	else{
		s="国际米兰";
	}
	cout<<"现在你已经是"<<s<<"的教练了"<<endl;
	cout<<"请选择敌对球队"<<endl;
	cout<<"1.AC米兰 ,2.皇马,3.那不勒斯,4.拜仁,5.大巴黎,5.利物浦" <<endl;
	cin>>y;
	if(y==1){
		k="AC米兰";
	}
	else if(y==2){
		k="皇马";
	}
	else if(y==3) {
		k="那不勒斯";
	}
	else if(y==4){
		k="拜仁";
	}
	else if(y==5){
		k="大巴黎";
	}
	else{
		k="利物浦";
	}
	cout<<k<<"已入场"<<endl;

	return 0;
}
原文