# A formula to find the organs's value from $1$ to $100$.

We have a variable named NUMBER

This variable, can hold ANY number from $1$ to $100$.

Let's mark that number as $X$.

We know that:

$x(1) = 1000$ Coins $x(100) = 250$ Coins

I need to write down a formula that will automatically find the coins amount of the variable $x$ (NUMBER).

Any ideas?

-

## 1 Answer

There are many choices: One approach is $$\begin {cases} x(NUMBER)=1000 & x \neq 100 \\x(NUMBER)=250 & x=100 \end {cases}$$ which is probably not what you are thinking. You need to specify better what you want. Probably what you are thinking is $$x(NUMBER)=1000-\frac {750}{99}(NUMBER-1)$$ which is a straight line

-
I've this answer from a different site: (1000 - 250) / 100 = 7.5 ==> 250 + (750 - (NUMBER * 7.5)) = Number's coins value Do you know what he did there? – David Jun 11 '13 at 15:16
@David: the thinking is like my second. It missed that there are $99$ gaps, not $100$ because you are counting from $1$, not $0$. I accounted for the fact that you are counting from $1$ with the $99$ and the $-1$. Plug $1$ into that formula and you get $992.5$ – Ross Millikan Jun 11 '13 at 15:20
Oh... now I get it. Thanks a lot mate, there we go. – David Jun 11 '13 at 15:22