The rule is to write a getchar()
after every integer/float/double input if you take char/string inputs later. This getchar()
flushes out the \n
from the input buffer which is leftover by taking the integer/float/double input.
So just write a getchar();
after scanf ("%lf",&originalTemp);
and you'll be fine.