turlogh wrote:

I need to know to figure out how many times you can increase a number by itself+5 until you reach a certain total

lets say you start at x=80,000 how many times would it take to reach y=200,000,000 by 80,000+80,005+80,010 etc

so I want to know how many additions of x=x+5 it takes to reach y so I can do x=x+(z*5) if z is the total count of these additions

hope I typed this out clearly enough...

What you're looking for is information about

consecutive integers.

Specifically, you want to know how many multiples of 5 there are from 80,005 to 200,000,000, inclusive. (Bonus question: why did I say 80,005 and not 80,000?)

To count how many numbers are in a range, you have to do four things:

1. Check your endpoints. Make sure both endpoints are divisible by the number you're counting up by. In this case, you want to make sure your endpoints are divisible by 5. Both 80,005 and 200,000,000 are divisible by 5, so you're good.

2. Find the difference. 200,000,000-80,005 = 199,919,995.

3. Divide the difference by the number you're counting up by. 199,919,995/5 = 39,983,999.

4. Add one, then you're done! 39,983,999 + 1 = 39,984,000.

The answer is 39,984,000.

_________________