scanf和getchar问题
while((ch = getchar()) != '\n')13 {
14 if(scanf("%d %d", &rows, &cols) != 2)
15 break;
16 while(getchar() != '\n')
17 continue;
18 display(ch, rows, cols);
19 printf("Enter another character and two integers;\n");
20 printf("Enter a newline to quit.\n");
21 }
第二个while有什么作用, 执行scanf最后肯定有一个\n,那这个while不是永远不会执行了