这是我的代码
const char *s[5];={"abcd","efgh","ijkl","mnop","qrst"};
char a[4];
while (1)
{
scanf("%4s",&a);
//compare a with s array
if(/*a exists in s*/)
printf("it is ok");
if(/*a does not exist in s*/)
printf("it is not ok");
}
例如,当我键入“dcba”时,我想看到“它不好”。当我输入“efgh”时,我想看到“没关系”。