Task 3 for me was quite simple, as you can see its quite basic. All we were asked to do is t calculate the cost of the order. Each pizza was $7 and each extra topping was $0.6. Based on that information the following javascript code can calculate the total amount with simple maths!
// TASK 3
var pizza= prompt("How many pizzas?");
var topping= prompt("How many toppings?");
alert(pizza*7+topping*0.6)
No comments:
Post a Comment