Calculating future value with compound interest with JavaScript

后端 未结 6 1567
悲哀的现实
悲哀的现实 2021-02-04 19:39

I\'m trying to work on a script where the user inserts a monthly income and gets the future value with compound interest after 30 years. As it is now, I\'ve assigned some values

6条回答
  •  孤街浪徒
    2021-02-04 20:01

    This is my way of writing code for compound interest

    function call()
        {
            var A = Principle;
            var B = Interest;
            var C = Years;
            var D = 0;
            var E = A*B/100;
            D+=E;
            var f=E+A;
            document.write("0 year: Interest "+E+" Principal: "+f);
            document.write("
    "); for (var i=1; i"); } return false; }

提交回复
热议问题