Hi, I'm new to input and output in C. The following code has two input statements:
But the console ignores my second input statement and looks like this:Code:#include<stdio.h> #include<stdlib.h> //SamsFirst_IO.c int main(){ int x,y; printf("Type a letter: "); x = getchar(); printf("Type another letter: "); y = getchar(); //printf("You typed '%c'.\n",c); putchar('\n'); printf("You typed "); putchar(x); printf(" and "); putchar(y); printf(".\n"); return(0); }
What's going on?