S
S
Sarkis Arutiunian2016-02-07 05:37:24
Mathematics
Sarkis Arutiunian, 2016-02-07 05:37:24

Mathematical formula for calculating the commission?

After a long work, the head doesn’t understand at all) we need a simple mathematical formula for calculating the commission, here is the condition of the problem:
The cost of the goods is $ 20, the commission of the payment system is 3.9% + $ 0.30, how to calculate the cost of the goods so that after payment we would have exactly $ 20 left? ))
do not forget that the number 21.1 will not work, since the commission 1.1 will be calculated from $20 and the payment will already take $21.1, respectively, and the commission will be calculated from 21.1. If lead to a simple checkmate. formula, we get the following condition:
x \u003d (20 + x) * 0.039 + 0.30
what will x be equal to? or rather, how to dynamically calculate X at a different price (other than 20).
You can offer a solution in the form of a formula in any of the languages ​​javaScript / java / c++ / php / python or in the form of a simple mat. formulas.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2016-02-07
@sarkis-tlt

y - y * 0.039 - 0.3 = x
y * (1 - 0.039) = x + 0.3
y = (x + 0.3) / 0.961
x = 20; y = 21.1238

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question