Guest User

Untitled

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