I\'m trying to read a character from the console (inside a while loop). But it reads more than once.
Input:
a
Output:
in scanf("%c",&in); you could add after %c a newline character \n in order to absorb the extra characters
scanf("%c",&in);
%c
\n
scanf("%c\n",&in);