This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

float truncation

hi everyone;
i am using a float value for my calculation
eg: weight = 999.99 (ideally)
but float weight = 999.989999 (by float data type as we get 6 digits after decimal)
i am not displaying this value but i want to use weight = 999.99 for my calculation.
thus how to truncate as well as roundoff it upto 2 digits after decimal
thank u all