1


1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include<stdio.h> int main(void) { char ch1,ch2,ch3,ch4; printf("문자를 입력하세요="); scanf("%c",&ch1); //%c는 한 문자를 키보드 버퍼에서 가져옴 fflush(stdin); //버퍼를 비움 printf("문자를 입력하세요="); scanf("%c",&ch2); // 엔터나 스페이스도 하나의 문자 fflush(stdin); //버퍼를 비움 printf("문자를 입력하세요="); scanf("%c",&ch3); fflush(stdin); //버퍼를 비움 printf("문자를 입력하세요="); scanf("%c",&ch4); fflush(stdin); //버퍼를 비움 printf("입력한 4개의 문자는 %c %c %c %c \n",ch1,ch2,ch3,ch4); return 0; } Colored by Color...



원문링크 : 1