69,369
社区成员
发帖
与我相关
我的任务
分享
for (int i=0; i <10; i++)
{
printf("%d\n",i);
fflush(stdin);
scanf("%c",&a);
//或者加一句getchar();
}
for (int i=0; i <10; i++)
{
printf("%d\n",i);
fflush(stdin); //这样保证你每次读取缓冲区的正确性
scanf("%c",&a);
}