Well, let's solve the equations:
Computer 10% off Price = 450$
Computer $10 off Price = 490$
Which can be written as (let x
be the initial price of the computer)
x - x * 10 / 100 = 450 # initial price - x without 10 % from x - x * 10% / 100%
x - 10 = 490 # just 10$ off
Or
0.9 * x = 450
x = 500
Finally
x = 450 / 0.9 = 500
x = 500
So from both equations we have that the initial computer's price is 500$
Edit: in general case,
if $discount_value
stands for per cent (i.e. $discount_value = 10
means 10%
discount) then
$gross_price = $net_total * 100.0 / (100.0 - $discount_value)
if $discount_value
stands for money (i.e. $discount_value = 10
means 10$
discount), then
$gross_price = $net_total + $discount_value