编辑代码

#include <stdio.h>
#include <string.h>
int main () {
    char data[50];
    while(strcmp ("byebye", data) != 0) {
            scanf("%s", data);
            if(strcmp("hi", data) == 0) {
                printf("hi!\n");
            } else if(strcmp("hello", data) == 0) {
                printf("hello!\n");
            } else if(strcmp("name", data) == 0) {
                printf("I AM ZHOUJINZE\n");
            } else if(strcmp("age", data) == 0) {
                printf("I AM 9 YEARS OLD\n");
            } else {
                printf("I DON'T KNOW\n");
            }
    }
    if(strcmp("byebye", data) == 0) {
        printf("byebye\n");
        return 1;
    }
    return 0;
}