In[1]:= startingValue= Quantity[500, "USDollars"];
interestRate= .3;
numberOfYears = 5;
In[4]:= futureValue[s_, i_, n_] := s+n*i*s;
In[5]:= futureValue[startingValue, interestRate, 1]
Out[5]= $650.
In[6]:= futureValue[startingValue, interestRate, 5]
Out[6]= $1250.
Comments
Leave a comment