When you used scanf() to retrieve the number the end of line character was left in the input buffer, which is causing your problems. You need to clear the input buffer before you try to get your...