English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories








2007-06-23 23:30:24 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

3 answers

Well the main problem of course is that the calculateInterest and setInterestRate functions are empty, so it will never calculate an amount of interest.

The other problem is that the "document.write" calls inside your loop will only output once the loop is complete, so you'll only see the amount for each expression once you enter N to finish. You should probably use other ways of getting the text in, like document.innerHTML.

2007-06-24 00:00:25 · answer #1 · answered by Daniel R 6 · 0 0

I think the problem is wid the following function ;
function twoDPs(anyNumber)
{
return Math.round (100 * anyNumber) / 100
};

use parseInt(anyNumber) in place of anyNumber
while multiplying with 100 ..
Also complete the other un complete function..

2007-06-24 00:21:05 · answer #2 · answered by Mamnoon 2 · 0 0

You place semi-colons in the wrong place in your functions e.g.

function twoDPs(anyNumber)
{
return Math.round (100 * anyNumber) / 100
};

should be:-

function twoDPs(anyNumber)

{ return Math.round (100 * anyNumber) / 100 ; }

The semi-colon should be within the curly brace.

2007-06-24 00:36:20 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers