[[Additional Algorithms]]
This is a simple and compound interest algorithm, provided that we have the time, initial deposit and interest rate given.
function interest(P,r,n) { let simpleInterest=P+Prn let compoundInterest=P; for(let i=0;i<n;i++){ compoundInterest+=compoundInterest*/r } return [Math.round(simpleInterest),Math.round(compoundInterest)] }
/ is used to escape the asterisk
#algorithms