Modify the compound interest program presented in my JS Control Statements and Loops slides (p. 16-18) so that it calculates and displays the amount of money in the account and the amount accumulated from the interest at the end of each year using an html form for the corresponding input and output. The input boxes can be labeled "Principal", "Rate" and "Years". The two output boxes can be labeled “Amount” and “Interest”. The form should provide also two buttons “Calculate” and “Clear” as shown below.

//Code to copy
<html>
<head>
<title>Web App for Compound Interest
Calculation</title>
<script type="text/javascript">
function calculate() {
p = document.getElementById("principal").value;
r = document.getElementById("rate").value;
t = document.getElementById("years").value;
n = 1;
// A = p * [[1 + (r/n)] ^ nt]
A = (p * Math.pow((1 + (r / (n * 100))), (n * t)));
//rounding to 2 decimal places
document.getElementById('amount').value =
A.toFixed(2).toString();
document.getElementById('interest').value = (A.toFixed(2) -
p).toFixed(2);
}
function clear() {
document.getElementById('principal').innerHTML = " ";
document.getElementById('rate').innerHTML = " ";
document.getElementById('years').innerHTML = " ";
document.getElementById('amount').innerHTML = " ";
document.getElementById('interest').innerHTML = " ";
}
</script>
<style>
div {
display: table-row;
}
label,
input {
display: table-cell;
}
</style>
</head>
<body>
<table style="width:100%" border="1" bgcolor="#c0c0c0">
<col align="right">
<col align="left">
<tr>
<td colspan="2" align="center">
<font color="blue">HOW YOUR INVESTMENT
GROWS</font>
</td>
</tr>
<tr>
<td>Principal</td>
<td><input id="principal"></td>
</tr>
<tr>
<td>Rate </td>
<td> <input id="rate"></td>
</tr>
<tr>
<td>Years </td>
<td> <input id="years"></td>
</tr>
<tr>
<td> Amount </td>
<td>
<input id="amount">
</td>
</tr>
<tr>
<td>Interest </td>
<td>
<input id="interest">
</td>
</tr>
<tr>
<td><button
onclick="calculate()">Calculate</button></td>
<td><button
onclick="clear()">Clear</button></td>
</tr>
</table>
</body>
</html>
---------------------------------------------------------------------
Sample Output:

Modify the compound interest program presented in my JS Control Statements and Loops slides (p. 16-18)...
IN php .... I need Help I Need to Modify this application so it uses a persistent session to save the last values entered by the user for 5 minutes. At the top of the file (before the DOCTYPE html line) you will need to add a section of code which checks to see if a session id exists. If it does not, the code you add (which will be similar to the example on page 359) will need to...
Programming question. Using Visual Studio 2019 C#
Windows Form Application (.NET Framework)
Please include code for program with ALL conditions met.
Conditions to be met:
Word Problem A person inherits a large amount of money. The person wants to invest it. He also has to withdraw it annually. How many years will it take him/her to spend all of the investment that earns at a 7% annual interest rate? Note that he/she needs to withdraw $40,000.00 a year. Also there...
I need Summary of this Paper i dont need long summary i need
What methodology they used , what is the purpose of this paper and
some conclusions and contributes of this paper. I need this for my
Finishing Project so i need this ASAP please ( IN 1-2-3 HOURS
PLEASE !!!)
Budgetary Policy and Economic Growth Errol D'Souza The share of capital expenditures in government expenditures has been slipping and the tax reforms have not yet improved the income...
1. When it comes to financial matters, the views of Aristotle can be stated as: a. usury is nature’s way of helping each other. b. the fact that money is barren makes it the ideal medium of exchange. c. charging interest is immoral because money is not productive. d. when you lend money, it grows more money. e. interest is too high if it can’t be paid back. 2. Since 2008, when the monetary base was about $800 billion,...