Answer:
Create one label and one textbox, and name them quatity, both of them. Now add another label, and name it Price. And add a button, and name it calcprice. Also add state textbox for state. Add a textbox and name it state
Now Double click calcprice button in design mode, and add in calcprice_click, code given below:
If Convert.ToInt32(quantity.Text) <50 and (state.Text != Connecticut or state.Text !=Massachusetts) Then
Price= Convert.ToInt32(quantity.Text) x 2.25
If Convert.ToInt32(quantity.Text) <50 and (state.Text == Connecticut or state.Text ==Massachusetts) Then
Price.Text= Convert.ToInt32(quantity.Text) x 2.25 +20
ElseIf Convert.ToInt32(quantity.Text) >=50 and (state.Text != Connecticut or state.Text !=Massachusetts) Then
Price.Text= Convert.ToInt32(quantity.Text) x 1.50
Else
Price.Text= Convert.ToInt32(quantity.Text) x 1.5 +20
End If
Please add this code and it should work fine.
Explanation:
Please check the answer section.