So I am working on a problem for a program I am making...
Say I have two numbers: 10 and 100, than I have a variable. How would i find what percent the variable is between the two numbers?
45 is 50% between 10 and 100
17.5 is 25% between 10 and 100
62.5 is 75% between 10 and 100.
But I need an equation that would work no matter what the 3 numbers were (assuming the number we are solving the percent of is between the two other numbers).
So what percent is 34 in relation to 20 and 300.
Or what percent is 79 in relation to 0 and 85.