# Select two numbers between 1 to 100

Question: In how many ways we can select two numbers between $1$ and $100$ so that the two selected numbers have a difference of at most $10$.

My Approach: I calculated the answer to be $925$ but I am not really sure if it is the correct answer.

This how I approached it, As the question says "between" so it means numbers ranging from $2$ to $99$, so $(2,3), (2,4), (2,5), (2,6),\dots,(2,12)$ so $10$ ways like this proceeding similarly till $(89,99)$ we will get $880$ numbers. From here onwards, $(90,99)$—$9$ ways; $(91,99)$ &mdash $8$ ways; … $(98,99)$ — $1$ way, so $45$ ways like this. Adding up all: $880+45 = 925$ ways in all

• Between $1$ and $100$ is more likely to be intended as including the endpoints. – André Nicolas Nov 1 '13 at 4:36