about | help | code help+videos | done | prefs |
investmentCalc() -- The simple interest formula, compounded yearly, is given by the formula: A = P(1 + r) where A = The total amount of money you have after the investment P = Principle, the amount of money you invested r = rate, the interest rate of the investment n = number of years the investment grows. Write a method that returns A (the amount) to the nearest dollar, given P, r, and n as parameters. investmentCalc(1000, 0.15, 10) → 4045 investmentCalc(100, 0.07, 100) → 86771 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 15
Copyright Nick Parlante 2017 - privacy