here is task number 3 revised and with the comments in the actual code.
var np = prompt("How many pizzas do you want?");
for (i = 1; i <= np; i++)
{var nt = prompt("how mant toppings on pizza " + " " + i + "?");
var cost = (np*7) + (nt * 0.6); }
alert("Total price is " + "$"+ cost + "");
//gets a value and then keeps on adding a defined ammount until it is told to stop
No comments:
Post a Comment