EDIT: Sorry for the unclear description of what I really wanted. I have completely rewritten my question to make it clearer..
On a specific software I am creating, I want to know if there is an alternative formula on finding x here:
d = a / 100
e = b / 100
f = c / 100
g = z - (z * d)
h = g - (g * e)
x = h - (h * f)
The values of a, b, c and z are user inputted. For example, if a=5, b=4, c=3 and z=100:
d = 0.05
e = 0.04
f = 0.03
g = 95
h = 91.2
x = 88.464
Can you guys suggest of a simpler/alternative formula to find x?
EDIT: The purpose of this formula is to apply a certain discount to a product price. For example, if product's price is \$100, and 5/4/3% discount is applied, the new product price should be \$88.464