How do you know that it is reading only 5? Are you using a debugger or using printf? If you are using printf maybe you are using a wrong format specifier.
Because if I don't use that method and just print out some number it works.
I've used the following specifiers:
%f -- gives 5.000000
%.2g gives 5 ( g is the only one I know how to use to format decimal places)
Uhhh, why does C have to be a pain in the butthole?