cin>> c >> n;
will read the two numbers but not the terminating lf/cr. This is still in the buffer. So when you do


cin.get();
after outputting the answer, this takes the lf/cr already present...