[code]
function calculateInterest(numberOfPounds)
{
//
};
// Insert your code here for part (iii)(a)
// Main program starts here
setInterestRate();
displayInterestRate();
document.write(‘<BR><BR><BR><BR>’);
//
response = window.prompt(‘Do you want to calculate the interest on an amount of money (Y/N)? ‘,”);
while(response == ‘Y’ || response = ‘y’)
{
amountInPounds = window.prompt(‘Enter amount in Pounds ‘,”);
interest = calculateInterest(amountInPounds);
document.write(‘£ ‘+ amountInPounds + ‘ attracts £’ + interest + ‘ interest’);
document.write(‘<BR><BR><BR>’);
response = window.prompt(‘Do you want to calculate the interest for another amount (Y/N)? ‘,”)
}
I need help with making a function called ‘CalculateInterest()’ with the argument ‘numberofPounds’
I need it to make requested calculations and return answers rounded off to the nearest penny. I need an addition made so that the function is called properly.
And as you know the amount of interest is given by multiplying the amount of money by the interest rate and dividing the result by 100.
Please help.