剪刀石头布(c++)
作者:互联网
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a;
char b;
cin>>a;
while(a--)
{
while(cin>>b)
{
if(b=='S') cout<<"Rock\n";
if(b=='R') cout<<"Paper\n";
if(b=='P') cout<<"Scissors\n";
}
}
}
标签:std,cout,int,cin,c++,石头,while,main,剪刀 来源: https://blog.csdn.net/gyk1303/article/details/122159786