Dokins

16/04/2014, 03:14 PM

Basically I'm trying to calculate the rate of inflation to apply that to everything in my server so:

Say the total amount in the server this month is: $1000.

Next month it's $2000.

That's a 100% increase, right?

How do I add that to each item. I.e

Say a cellphone costs $100, How do I add the rate of inflation to that amount if it's $100 increase? Would it be $200 now instead of $100?

How do I actually calculate it in code?

Say the total amount in the server this month is: $1000.

Next month it's $2000.

That's a 100% increase, right?

How do I add that to each item. I.e

Say a cellphone costs $100, How do I add the rate of inflation to that amount if it's $100 increase? Would it be $200 now instead of $100?

How do I actually calculate it in code?