为?什?么?不?对?

zhangxiaochen  •  1年前


include

include

using namespace std; int main(){

int n;
cin>>n;
for(int w=0;w<n;w++){
	char p1[8],p2[8];
	gets(p1);getchar();gets(p2);
	if(p1=="Paper"){
		if(p2=="Rock")cout<<"Player1";
		if(p2=="Paper")cout<<"Tie";
		if(p2=="Scissors")cout<<"Player2";
	}
	if(p1=="Scissors"){
		if(p2=="Rock")cout<<"Player2";
		if(p2=="Paper")cout<<"Player1";
		if(p2=="Scissors")cout<<"Tie";
	}
	if(p1=="Rock"){
		if(p2=="Rock")cout<<"Tie";
		if(p2=="Paper")cout<<"Player2";
		if(p2=="Scissors")cout<<"Player1";
	}
	cout<<endl;
}
return 0;

}


评论:

不道啊


jizhexi  •  1年前