字符串判断,如果等于,则打印输出对应的中文
#include <bits/stdc++.h>
using namespace std;
int main()
{
string str;
getline(cin,str);
if(str=="north east"||str=="east north"){
cout<<"东北"<<endl;
}else if(str=="east south"||str=="south east"){
cout<<"东南"<<endl;
}else if(str=="north west"||str=="west north"){
cout<<"西北"<<endl;
}else{
cout<<"西南"<<endl;
}
return 0;
}