#include <stdio.h>
int main(void)
{
int i, j;
scanf("%d", &i);
printf("i = %d\n", i);
while (getchar() != '\n') {
continue;
}
scanf("%d", &j);
printf("j = %d\n", j);
return 0;
}
使用while循环读取多余的字符
网友评论