我一定是疯了:-(。我不确定,但如果我输入 2,我会得到是和不显示...
int main(void)
{
int input;
char yes[3] = "yes";
char no[2] = "no";
printf("Are you ok? Type in 1 for yes or 2 for no.\n");
scanf("%d", &input);
if (input == 1)
printf("%s, I am\n.", yes);
else
printf("%s, I am not\n.", no);
getchar();
getchar();
}