This program is for "Guessing a secret number"
Code:#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { char i; printf("Guess the secret number!\n"); while(i!='8'){ i=getchar(); getchar(); printf("You've entered %c\n",i); } printf("You finally guessed!\n"); system("PAUSE"); return 0; }
I understand the whole code except for 1 part.
i=getchar();
getchar(); <-why is this written again here?
Can anyone explain me that part please
thanks