#21755: answer


goodspeed (王宥翔)

學校 : 臺北市私立延平高級中學
編號 : 103387
來源 : [123.192.203.131]
最後登入時間 :
2024-09-28 21:41:36
a135. 12250 - Language Detection -- UVa12250 | From: [219.91.51.28] | 發表日期 : 2020-07-16 16:32

#include<iostream>

#include<stdio.h>

#include<cstring>

using namespace std;

 

int main() {

char a[100];

int b = 1;

while (scanf("%s", &a) != EOF) {

if (strcmp(a, "#") == 0) return 0;

printf("Case %d: ", b);

 

if (strcmp(a, "HELLO") == 0) printf("ENGLISH");

else if (strcmp(a, "HALLO") == 0) printf("GERMAN");

else if (strcmp(a, "ZDRAVSTVUJTE") == 0) printf("RUSSIAN");

else if (strcmp(a, "BONJOUR") == 0) printf("FRENCH");

else if (strcmp(a, "CIAO") == 0) printf("ITALIAN");

else if (strcmp(a, "HOLA") == 0) printf("SPANISH");

else printf("UNKNOWN");

printf("\n");

b++;

}

 
ZeroJudge Forum