title: How to add a recurring Interest rate onto a recurring and growing amount
body: <p>I am trying to add the given percentage onto a number repeatedly over a few months that already has the percentage added on from the previous month.</p>
  
  <p>I.e, The user defines 25% (this is not set could be any number of percent) I then add 25% onto the amount they invested to start with, for example:</p>
  
  <p>Customer invests £10,000, I add 25% onto £10,000, which equals £12,500. <strong>AND THEN</strong> the following month I add the 25% onto the £12,500 from the month before, which should equal £15,625.</p>
  
  <p>It should be a case of simple maths, yet i cannot figure this out using Javascript. I keep getting the value of £15,000, and cannot work out how to store the given percentage in a variable itself and then add that percentage onto the Total amount.</p>
  
  <p>Here is some code.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// Set the values...
    Num = prompt("Enter a percentage using a decimal Number...");
    interestRate = Num*100;
    startCash = 10000;
    total = startCash*interestRate/100+startCash;
    month = 1;
    
    // Inputting Text...
    StartText = "Starting Money: £";
    IntText = "Interest Earned: ";
    TotalText = "Total Amount: £";
    MonthText = "Month: ";
    
    displayStart = StartText + startCash + "\n";
    dispInt = IntText + interestRate + "\n";
    dispTotal = TotalText + total + "\n";
    dispMonth = MonthText + month + "\n";
  
  
    dispvalue = displayStart + dispInt + dispTotal + dispMonth;
    
  
  
    console.log (dispvalue);
  
    addInt = total + interestRate*100;
  
    console.log (addInt);</code></pre>
  </div>
  </div>
  </p>