24.07.2015, 15:20
Because you're using the wrong specifier.

When using %f, you'll get the entire float amount, e.g "97.319495", to avoid this you can use %.0f for no decimals, %.1f for 1 decimal (e.g. 97.3)

When using %f, you'll get the entire float amount, e.g "97.319495", to avoid this you can use %.0f for no decimals, %.1f for 1 decimal (e.g. 97.3)