hi all, i want to cut off digits after point in float no.
ex.
1.245
should be
1.2
Printable View
hi all, i want to cut off digits after point in float no.
ex.
1.245
should be
1.2
Is this when you read them in, or when you print them out?
Because you can't do it with the internal representation since floats are approximations. You're always going to end up with say 1.200001 or 1.199999 as being the nearest representable value.
i want them to come while printing
thanks