...

View Full Version : unterminated string literal error



kjames
03-03-2009, 03:07 AM
hi, can anyone help with this, thank you so much!

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Coin Calculator</title>
</head>

<body>
<script type="text/javascript" language="javascript">

var input;
var amount;
var nQtrs;
var nDimes;
var nNickels;
var nPennies;
var nCoins;

input = prompt("Please enter a monetary amount in te form XXX.XX")

amount = parseFloat (input);
amount = amount * 100;
nQtrs = amount / 25;
nQtrs = parseInt ( nQtrs );
amount = amount - ( nQtrs * 25);
amount = amount % 25;
nDimes = parseInt ( amount / 10 );
amount = amount % 10;
nNickles = parseInt ( amount / 5);
nPennies = amount;
nCoins = nQtrs + nDimes + nNickles + nPennies;

document.write( "At minimum, you need " + nCoins + " to make $" + input ' <br />);
document.write( "Quarters = " + nQtrs + " <br />);
document.write( "Dimes = " + nDimes + " <br />);
document.write( "Nickles = " + nNickles + " <br />);
document.write( "Pennies = " + nPennies + " <br />);

</script>
</body>

</html>

kjames
03-03-2009, 03:10 AM
can anyone try to run this and find out what the problem is plz, thank you so much for your time, i appreciate!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum