Guest User

Untitled

a guest
Feb 19th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     result += "Toppings: ";
  2.   if ( pizza_pep )
  3.   {
  4.     result += 'pep';
  5.     price += 1.00;
  6.   }
  7.   if ( pizza_cheese )
  8.   {
  9.     result += 'cheese';
  10.     price += 2.00;
  11.   }
  12.   if ( pizza_bacon )
  13.   {  
  14.     result += 'bacon';
  15.     price += 1.00;
  16.   }
  17.  
  18.  
  19.   if(size == 'small')
  20.     {
  21.         price += 10;
  22.     }
  23.  
  24.     if(size == 'medium')
  25.     {
  26.         price += 15;
  27.     }
  28.    
  29.     if(size == 'large')
  30.     {
  31.         price += 20;
  32.     }
  33.  
  34.    
  35. var price = size + result;
  36.  
  37.   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