Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- result += "Toppings: ";
- if ( pizza_pep )
- {
- result += 'pep';
- price += 1.00;
- }
- if ( pizza_cheese )
- {
- result += 'cheese';
- price += 2.00;
- }
- if ( pizza_bacon )
- {
- result += 'bacon';
- price += 1.00;
- }
- if(size == 'small')
- {
- price += 10;
- }
- if(size == 'medium')
- {
- price += 15;
- }
- if(size == 'large')
- {
- price += 20;
- }
- var price = size + result;
- cpsc2030set( "answer" + "You have ordered a " + size + " pizza. The toppings are : " + result + " The final price for the pizza is : $" + price);
Add Comment
Please, Sign In to add comment