Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. Public Class Form1
  2.  
  3. Private Sub btnCheck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCheck.Click
  4. Dim intWeight, intLength, intWidth, intHeight, intVolume As Integer
  5. intWeight = Val(txtWeight.Text)
  6. intLength = Val(txtLength.Text)
  7. intWidth = Val(txtWidth.Text)
  8. intHeight = Val(txtHeight.Text)
  9. intVolume = Val(intLength * intWidth * intHeight)
  10. If intVolume <= 100000 and intWeight <= 27 Then
  11. Me.lblAnswer.Text = "Accepted"
  12. ElseIf intVolume > 100000 and intWeight <= 27 Then
  13. Me.lblAnswer.Text = "Rejected:" And Me.lblAnswerExplain.Text = "Too big, but not too heavy"
  14. ElseIf intVolume <= 100000 and intWeight > 27 Then
  15. Me.lblAnswer.Text = "Rejected:" And Me.lblAnswerExplain.Text = "Too heavy, but not too big"
  16. ElseIf intWeight > 27 Then
  17. Me.lblAnswer.Text = "Rejected:" And Me.lblAnswerExplain.Text = "Too Heavy"
  18. ElseIf intVolume > 100000 Then
  19. Me.lblAnswer.Text = "Rejected:" And Me.lblAnswerExplain.Text = "Too big"
  20. End if
  21. End Sub
  22. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement