Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var toppings = cpsc2030get( "toppings" );
- var pizza_pep = cpsc2030get( "pizza_pep" );
- var pizza_cheese = cpsc2030get( "pizza_cheese" );
- var pizza_bacon = cpsc2030get( "pizza_bacon" );
- 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;
- }
- result += "toppings: " + "<br />";
- var size = cpsc2030get( "size")
- var small = cpsc2030get( "small" );
- var medium = cpsc2030get( "medium" );
- var large = cpsc2030get( "large" );
- if(size == 'small')
- {
- price = 10;
- }
- if(size == 'medium')
- {
- price = 15;
- }
- if(size == 'large')
- {
- price = 20;
- }
- result += "size: ";
- var total = size + toppings;
- cpsc2030set( "answer" + "You have ordered a " + size + " pizza. The toppings are : " + toppings " The final price for the pizza is : $" +total);
Add Comment
Please, Sign In to add comment