问题
This must be a simple question but I can't work it out!
I have a number that I know has been reduced to 70% of its original size, how do I find the original number?
For example I have the number 9.1, which is 13 x 70%, but what is the calculation for finding 13?
回答1:
You want
originalNumber = reducedNumber / (percentage / 100);
for example
13 = 9.1 / (70 / 100)
回答2:
Well if you have some number x
, you're looking for a y
so that
y * 70% = x
y * 70/100 = x
y = 100 * x / 70
回答3:
Taking your example.
Say you have an item with DiscPrice = 9.1
and the discount amount is Disc = 30%
and you wanted to calculate the original `SellingPrice' before the discount. Then the equation will be:
SellingPrice = ( DiscPrice * 100 ) / ( 100 - Disc )
// in your case then it will be
SellingPrice = ( 9.1 * 100 ) / ( 100 - 30 )
= 13
See it in action:
The above formulate for the decrease percentage calculation. There is also an increase percentage calculation here: https://stackoverflow.com/a/54125117/850840
来源:https://stackoverflow.com/questions/20405793/reverse-percentage-lookup