Android Question Minus percentage from number

aaronk

Well-Known Member
Licensed User
Longtime User
Hi,

Can't seem to work out how to do this simple thing..

How do you minus 0.85% from a price ?

Let's say I have $123,456.00 as my price, how do I minus 0.85% from it so it becomes $122,406.624.

Any one know how to do this?
 

DonManfred

Expert
Licensed User
Longtime User
Simple math....

B4X:
    Dim price As Double = 123456.00
    Log($"$6.2{price}"$)
    price = price-((price/100)*0.85)
    Log($"$6.3{price}"$)

123,456
122,406.624
 
Upvote 0
Top