#include #include #include #include int main() { char choice[10]; printf(" 1.Input\n"); printf(" 2.Output\n"); printf(" 3.Order\n"); printf(" 4.Quit\n"); scanf("%s", choice); // 将输入的字符转换为小写字母,方便后续判断 for (int i = 0; i < strlen(choice); i++) { choice[i] = tolower(choice[i]); } if (strcmp(choice, "i") == 0) { printf("You are trying to Input info\n"); } else if (strcmp(choice, "o") == 0) { printf("You are trying to Output info\n"); } else if (strcmp(choice, "m") == 0) { printf("You are trying to Make things ordered\n"); } else if (strcmp(choice, "q") == 0) { printf("You are about to Quit\n"); } else { printf("Wrong input\n"); } return 0; }