I am trying to get a discount of an amount given
lets say: amount = "1.2" and discountPercentage = "17.3"
Code:
orig = Double.parseDouble("amount");
discount = orig*(discountPercentage/100);
discount = Math.round(discount);
discountedprice = orig - discount;
On the code above: when I round the discount using Math.round(0.2076) i am getting Zero(0) result.
What I want to happen is like this:
0.2076 = should get 0.21 when rounded up