#include <stdio.h>
#include <string.h>
int main() {
char s[10];
printf("Have you any problem? (yes/no)\n");
scanf("%5s", s);
while (strcmp(s, "yes") == 0) {
printf("Have you a problem with electronic devices? (yes/no)\n");
scanf("%5s", s);
if (strcmp(s, "yes") == 0) {
printf("Have you a problem with TV? (yes/no)\n");
scanf("%5s", s);
if (strcmp(s, "yes") == 0) {
printf("You must to go to TV master\n");
} else {
printf("Have you a problem with computer? (yes/no)\n");
scanf("%5s", s);
if (strcmp(s, "yes") == 0)
printf("You must go to sysadmin\n");
else
printf("I am sorry, I cannot help you.\n");
}
} else {
printf("Have you a problem with teapot? (yes/no)\n");
scanf("%5s", s);
if (strcmp(s, "yes") == 0) {
printf("Was you teapot broken? (yes/no)\n");
scanf("%5s", s);
if (strcmp(s, "yes") == 0)
printf("You must buy our super glue\n");
else
printf("I am sorry, I cannot help you.\n");
} else {
printf("I am sorry, I cannot help you.\n");
}
}
printf("Have you other problems? (yes/no)\n");
scanf("%5s", s);
}
printf("Good bye\n");
return 0;
}