// UVa 12250 - Language Detection #include <iostream> #include <string> #include <stdio.h> using namespace std; int main() { string l; int t = 0; while (getline(cin, l) && (l.length() != 1 || l[0] != '#')) { t++; if (l == "HELLO") printf("Case %d: ENGLISH\n", t); else if (l == "HOLA") printf("Case %d: SPANISH\n", t); else if (l == "HALLO") printf("Case %d: GERMAN\n", t); else if (l == "BONJOUR") printf("Case %d: FRENCH\n", t); else if (l == "CIAO") printf("Case %d: ITALIAN\n", t); else if (l == "ZDRAVSTVUJTE") printf("Case %d: RUSSIAN\n", t); else printf("Case %d: UNKNOWN\n", t); } return 0; }
Monday, September 5, 2016
UVa 12250 - Language Detection
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment