When you're reading an integer with cin >> a;, you're typing <digit> <digit> <digit> <digit> <ENTER> on the keyboard.
operator>> for integers consumes the digits, but goes no further, the <ENTER> is still waiting to be processed.
Your first cin.get() reads and returns that <ENTER> as the character '\n', which you don't assign anywhere.
Your second cin.get() reads and returns the next character to be entered, and since there's nothing after that Enter, it waits.
Note that if you enter <digit> <digit> <digit> <SPACE> <ENTER>, your double-cin-get will fail: the first will read the space, the second will read the enter, and the program will complete immediately. If you want to be bulletproof, read and discard everything first: cin.ignore(numeric_limits<streamsize>::max(), '\n'); (that's what is sometimes called "flushing" the input, although the concept of flushing doesn't apply to inputs)