Hi, I just want to know if is there any way in C to get only 1 input from user?
Like,
Enter a letter: a
After inputting a, should be that I can't anymore type with other letters, only 1.
I'm thinking that there's something in scanf that needs to be modified a little bit.
Thanks.
char letter;
printf("input a letter: ");
scanf("%c", &letter);
Like,
Enter a letter: a
After inputting a, should be that I can't anymore type with other letters, only 1.
I'm thinking that there's something in scanf that needs to be modified a little bit.
Thanks.
char letter;
printf("input a letter: ");
scanf("%c", &letter);
Comment