Is it possible to set the amount of decimal places a floating point number is taken too, as I want to print a currency value but the number ends up with 6 decimal places using a floating point number.
Thanks
Is it possible to set the amount of decimal places a floating point number is taken too, as I want to print a currency value but the number ends up with 6 decimal places using a floating point number.
Thanks
1. search forum
2. use "%.2f" format
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler