Define your problem in terms of itself:
To calculate the total dividends received over N periods, calculate the total dividends received over the first N-1 periods, then add the dividends received in the Nth period.
The rest should follow.
In reply to Re^3: dividend with recursive routine
by ikegami
in thread dividend with recursive routine
by derpp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |