Advertisement
DevUModerator

Untitled

Apr 5th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. {
  2. double total;
  3. if (babyRadioButton.Checked)
  4. total = 10.0;
  5. else if (mamaRadioButton.Checked)
  6. total = 13.0;
  7. else if (papaRadioButton.Checked)
  8. total = 16.0;
  9. if (deepRadioButton.Checked)
  10. total += 2.0;
  11.  
  12. total = (pepperoniCheckBox.Checked)? total + 1.5 : total;
  13. total = (onionsCheckBox.Checked) ? total + .75 : total;
  14. total = (greenPeppersCheckBox.Checked) ? total + .5 : total;
  15. total = (redPeppersCheckBox.Checked) ? total + .75 : total;
  16. if (anchoviesCheckBox.Checked) total += 2;
  17.  
  18. if((pepperoniCheckBox.Checked&&greenPeppersCheckBox.Checked&&anchoviesCheckBox.Checked) ||( pepperoniCheckBox.Checked&&redPeppersCheckBox.Checked&&onionsCheckBox.Checked))
  19. {
  20. total -= 2.0;
  21. }
  22.  
  23. this.total.Text = "$" + total.ToString();
  24.  
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement