Hello, All
I'm sure that's a piece of cake, but I'm fresh out of brain right now.
Given a specific decimal places, I need to know the nearest number lower that a specified number.
For example:
Decimal places: 2
Given number: 51245.54468
Desired number: 51245.54
Decimal places: 1
Given number: the same as above
Desired number: 51245.5
Decimal places: 0
Given number: the same as above
Desired number: 51245
What's the shortest code to achieve this?
Thank you
Grigore Dolghin
Class Software.