diff --git a/frame.c b/frame.c index d6d6ae1..73d6f81 100644 --- a/frame.c +++ b/frame.c @@ -16,32 +16,32 @@ int main(void) gets(password) while (words[i][0][0] != '\0') { - if (strcmp(words[i][0], word) == 0 && strcmp(words[i][1], password) == 0) - { - scanf("%d", &n); - getchar(); - switch(n) - { - case 1: - break; - case 2: - break; - case 3: - break; - default: - printf("您输入的数字不正确,请输入1,2,3中的任意一个数\n"); + if (strcmp(words[i][0], word) == 0 && strcmp(words[i][1], password) == 0) + { + scanf("%d", &n); + getchar(); + switch(n) + { + case 1: + break; + case 2: + break; + case 3: + break; + default: + printf("鎮ㄨ緭鍏ョ殑鏁板瓧涓嶆纭紝璇疯緭鍏1,2,3涓殑浠绘剰涓涓暟\n"); break; - } - } + } + } i++; - } + } } else if(n == 0) { } else - printf("您输入的数字不正确,请输入0,1中的其中一个数\n"); - } + printf("鎮ㄨ緭鍏ョ殑鏁板瓧涓嶆纭紝璇疯緭鍏0,1涓殑鍏朵腑涓涓暟\n"); + } return 0; }