답변 1
0
두 번째와 세 번째 input(rows, cols)이 받아들여집니다.
질문자님이 드신 예시의 경우 2, 4가 받아들여집니다.
아래 간략화된 코드로 확인해보세요.
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
char c;
int rows, cols;
printf("Input one character and two integers:\n");
while ((c = getchar()) != '\n')
{
scanf("%d %d", &rows, &cols);
printf("%d %d\n", rows, cols);
}
return 0;
}