Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub btnCheck_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCheck.Click
- Dim intWeight, intLength, intWidth, intHeight, intVolume As Integer
- intWeight = Val(txtWeight.Text)
- intLength = Val(txtLength.Text)
- intWidth = Val(txtWidth.Text)
- intHeight = Val(txtHeight.Text)
- intVolume = Val(intLength * intWidth * intHeight)
- If intVolume <= 100000 and intWeight <= 27 Then
- Me.lblAnswer.Text = "Accepted"
- If intVolume > 100000 and intWeight <= 27 Then
- Me.lblAnswer.Text = "Rejected:" And Me.lblAnswerExplain.Text = "Too big, but not too heavy;"
- End if
- If intVolume <= 100000 and intWeight > 27 Then
- Me.lblAnswer.Text = "Rejected:" And Me.lblAnswerExplain.Text = "Too heavy, but not too big"
- End if
- If intWeight > 27 Then
- Me.lblAnswer.Text = "Rejected:" And Me.lblAnswerExplain2.Text = "Too Heavy"
- End If
- If intVolume > 100000 Then
- Me.lblAnswer.Text = "Rejected:" And Me.lblAnswerExplain.Text = "Too big"
- End if
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement