I had posted this question on stack overflow because I am trying to implement a method that will loop through a set of percentages and add or remove them to a value based on some properties that are set. Here is a link to the question. I believe I have the compounding part correct. I partially have the non-compounding part, the problem is that I need to add just 1 to the very end instead of every time through the loop. The other issue I am facing is how do I mix compounding and non-compounding in the formula. Basically, I have the following scenarios:
All percentages are compounded and removed from the total.
All percentages are non-compounded and removed from the total.
All percentages are compounded and added to the total.
All percentages are non-compounded and added to the total.
All percentages are compounded, but some are removed and some are added.
All percentages are non-compounded, but some are removed and some are added.
Some percentages are compounded and some are non-compounded, but they are all added.
Some percentages are compounded and some are non-compounded, but they are all removed.
Some percentages are compounded and some are non-compounded, and they could be removed or added.
I believe I covered everything.
Thanks for the help