+ 1

What is the best options to keep money, which variable float or double?

About money variable

23rd Sep 2020, 7:10 PM
Ali Gider
4 Réponses
+ 2
Double is better, but I would consider decimal type. If you're working with real money, you'd want to avoid any chance it gets rounded off at wrong point.
23rd Sep 2020, 7:55 PM
BlazingMagpie
BlazingMagpie - avatar
+ 1
Just I want it can be minus as well like - 1000TRL I try to solve algorithm my project about maintenance our homes. Thank you very much BlazingMagpie for your advice.
24th Sep 2020, 10:57 AM
Ali Gider
0
What about money data type? It is takes point? Or can be - minus?
24th Sep 2020, 11:00 AM
Ali Gider