题目链接:http://livearchive.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2996
————————————————————————————————————————————
很水的题。可做map一个简单例子。
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <algorithm>
#include <math.h>
#include <string>
#include <map>
using namespace std;
map<string,string>Map;
int main()
{
string s;
int k = 0;
Map["HELLO"] = "ENGLISH";
Map["HOLA"] = "SPANISH";
Map["HALLO"] = "GERMAN";
Map["BONJOUR"] = "FRENCH";
Map["CIAO"] = "ITALIAN";
Map["ZDRAVSTVUJTE"] = "RUSSIAN";
while(cin>>s)
{
if(s[0] == '#') break;
cout << "Case " << ++k <<": ";
if(Map.find(s) == Map.end())
cout << "UNKNOWN" << endl;
else
cout << Map[s] << endl;
}
return 0;
}