Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
up vote 0 down vote accepted

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

share|cite|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.