Are all the numbers defined as floats? Are you accidentally changing the value of answer before outputting it? Are you correctly outputting the answer?
Then work it out with a calculator. I don't see anything wrong with your code, but it's worth splitting the statement up to figure out where our problem comes from. Remember, it comes from somewhere. When I get stuck like this, I am usually looking at it the wrong way.