其他环境下回车对应的字符可能为 '/r' */ flag = 1; else for (count = 1; count < N; count++) scanf("%c", &a[count]); printf("The target variable is:%d\n", flag); return 0; }本人原创,不懂欢迎追问!