Using java script I'm trying to have so you are prompted to put numbers in until you press 0, after that it will calculate and add all the numbers you put in. I think I'm getting pretty close to it..?
Anyways, if someone could help me out that would be awesome:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<script type="text/javascript">
var price;
var total;
var temp = 0
tax = 1.07
prompt("please enter price");
while(!price)
{
price = parseFloat(prompt("please enter a price or 0 to stop"));
if(price != 0)
{
temp+=price;
}
}
document.write("You total is $"+total.toFixed(2));
</script>
</body>
</html>
Anyways, if someone could help me out that would be awesome:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<script type="text/javascript">
var price;
var total;
var temp = 0
tax = 1.07
prompt("please enter price");
while(!price)
{
price = parseFloat(prompt("please enter a price or 0 to stop"));
if(price != 0)
{
temp+=price;
}
}
document.write("You total is $"+total.toFixed(2));
</script>
</body>
</html>