Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main(void)
- {
- char a[100];
- int b = 1, i;
- char *q = "HELLO", *w = "HOLA", *e = "HALLO", *r = "BONJOUR", *t =
- "CIAO", *y = "ZDRAVSTVUJTE";
- while (1) {
- scanf("%s", a);
- if (strcmp(a, "#") == 0) {
- break;
- } else if (strcmp(a, q) == 0) {
- printf("Case %d: ENGLISH\n", b);
- } else if (strcmp(a, w) == 0) {
- printf("Case %d: SPANISH\n", b);
- } else if (strcmp(a, e) == 0) {
- printf("Case %d: GERMAN\n", b);
- } else if (strcmp(a, r) == 0) {
- printf("Case %d: FRENCH\n", b);
- } else if (strcmp(a, t) == 0) {
- printf("Case %d: ITALIAN\n", b);
- } else if (strcmp(a, y) == 0) {
- printf("Case %d: RUSSIAN\n", b);
- } else {
- printf("UNKNOWN");
- }
- b++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement