I think repetition should be used
Why? There are formulas for the calculation of both simple and compound interest. Look 'em up. It's what Google's for. (There other search engines available apparently!)