I'm learning C and to get something done I need to ask the user to input 2 characters, like in this example: "b [enter] t". and store them in two different variables, but my code is not working that way.
Why doesn't this work? Is there a simple way to fix it?
void main(void){
int a,b;
printf("Input a char");
a=getchar();
printf("Input second char");
b=getchar();
printf("Characters entered: %c and %c.", a, b);
return 0
}