Jun-26-2020, 08:19 PM
Given the scenario
My question is how can I remove everything from the right of the decimal if it's a 0.
In the first example of eval I want the return to be 5 instead of 5.0 and if it's greater than 0 go ahead and return it like in the 2nd example.
Any help much appreciated.
eval(10/2)
would return 5.0
and eval(7/3)
would return 2.33
.My question is how can I remove everything from the right of the decimal if it's a 0.
In the first example of eval I want the return to be 5 instead of 5.0 and if it's greater than 0 go ahead and return it like in the 2nd example.
Any help much appreciated.